Created
September 11, 2014 12:27
-
-
Save MikeGillihan/88b7aa8798a74f04a1d8 to your computer and use it in GitHub Desktop.
Hide ACF Menu
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
// Show ACF menu for user_ID 1 only | |
function remove_acf_menu() { | |
$current_user = wp_get_current_user(); | |
if ( $current_user->ID != 1 ) { | |
remove_menu_page( 'edit.php?post_type=acf' ); | |
} | |
} | |
add_action( 'admin_menu', 'remove_acf_menu', 100 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment