Created
July 23, 2014 18:24
-
-
Save pippinsplugins/4061d850852e9d73531a to your computer and use it in GitHub Desktop.
Example of how to add access to the Members page in Restrict Content Pro to the Editor role
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 | |
function rcp_add_member_caps() { | |
// gets the editor role | |
$role = get_role( 'editor' ); | |
// Allow Editors to view Members in Restrict Content Pro | |
$role->add_cap( 'rcp_view_members' ); | |
} | |
add_action( 'admin_init', 'rcp_add_member_caps' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment