-
-
Save labsecrets/f8b968ad90dccfd1c2d8 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
/* | |
Set levels as "all access levels" so members of these levels will be able to view all Addon Packages. | |
Requires Paid Memberships Pro and the pmpro-addon-packages plugin. | |
*/ | |
function my_pmproap_all_access_levels($levels, $user_id, $post_id) | |
{ | |
//I'm just adding the level, but I could do some calculation based on the user and post id to programatically give access to content | |
$levels = array(16); | |
return $levels; | |
} | |
add_filter("pmproap_all_access_levels", "my_pmproap_all_access_levels", 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment