Created
October 23, 2019 21:29
-
-
Save dparker1005/3ff8128a39a7b2ca6ff1ba9072b0bd83 to your computer and use it in GitHub Desktop.
Give site admins access to PMPro BuddyPress content, even without membership level
This file contains hidden or 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 | |
// Copy from below here | |
/** | |
* Give site admins access to PMPro BuddyPress content, even without membership level | |
*/ | |
function my_pmpro_bp_give_admins_access( $can, $check, $user_id ) { | |
if( current_user_can( 'manage_options' ) ){ | |
$can = true; | |
} | |
return $can; | |
} | |
add_filter( 'pmpro_bp_user_can', 'my_pmpro_bp_give_admins_access', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment