Created
May 23, 2015 10:56
-
-
Save ofernandolopes/02628c2bdf59457305c0 to your computer and use it in GitHub Desktop.
WordPress - Remove contact form 7 menu for non-administrator users
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
//Remove contact form 7 menu for non-administrator users | |
if (!(current_user_can('administrator'))) { | |
function remove_wpcf7() { | |
remove_menu_page( 'wpcf7' ); | |
} | |
add_action('admin_menu', 'remove_wpcf7'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment