Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Changes membership manager so that they can only view the members list and add new members via PMPro Add Member.
<?php
// Copy from below here...
/*
* Changes membership manager so that they can only view
* the members list and add new members via PMPro Add Member.
*
* Can customize using your own caps from here:
* https://github.com/strangerstudios/pmpro-membership-manager-role/blob/35725b5cc9d7fd403255e4143a5bd5f1564b022d/pmpro-membership-manager-role.php#L16-L42
*/
function my_pmprommr_change_caps( $caps ) {
$new_caps = array(
'read' => true,
'pmpro_memberslist' => true,
'edit_users' => true,
);
return $new_caps;
}
add_filter( 'pmpro_membership_manager_caps', 'my_pmprommr_change_caps' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment