Last active
March 28, 2017 22:11
-
-
Save thomasplevy/9b165a5494166cf70713e551da60349c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // don't copy this to your functions.php file | |
/** | |
* Add additional pages to the list of pages shown to non-enrolled visitors when sitewide membership restrictions are in effect | |
* @param array $ids WP Post IDs | |
* @return array | |
*/ | |
function my_lifterlms_sitewide_restriction_bypass_ids( $ids ) { | |
// add the WP Post IDs of posts which can be accessed without being an enrolled member here | |
$custom_ids = array( 123, 456, 789 ); | |
return array_merge( $ids, $custom_ids ); | |
} | |
add_filter( 'lifterlms_sitewide_restriction_bypass_ids', 'my_lifterlms_sitewide_restriction_bypass_ids', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment