Skip to content

Instantly share code, notes, and snippets.

@ofernandolopes
Created May 23, 2015 10:56
Show Gist options
  • Save ofernandolopes/02628c2bdf59457305c0 to your computer and use it in GitHub Desktop.
Save ofernandolopes/02628c2bdf59457305c0 to your computer and use it in GitHub Desktop.
WordPress - Remove contact form 7 menu for non-administrator users
//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