Created
December 10, 2013 15:25
-
-
Save jrstaatsiii/7892405 to your computer and use it in GitHub Desktop.
Provide a list of usernames who can edit custom field definitions here
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
function remove_acf_menu() | |
{ | |
// provide a list of usernames who can edit custom field definitions here | |
$admins = array( | |
'admin', | |
'jrstaatsiii' | |
); | |
// get the current user | |
$current_user = wp_get_current_user(); | |
// match and remove if needed | |
if( !in_array( $current_user->user_login, $admins ) ) | |
{ | |
remove_menu_page('edit.php?post_type=acf'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment