Skip to content

Instantly share code, notes, and snippets.

@nairnwebdesign
Created December 30, 2013 13:43
Show Gist options
  • Save nairnwebdesign/8182235 to your computer and use it in GitHub Desktop.
Save nairnwebdesign/8182235 to your computer and use it in GitHub Desktop.
Hide JetPack from WordPress users who aren't administrators.
add_action( 'jetpack_admin_menu', 'hide_jetpack_from_others' );
function hide_jetpack_from_others() {
if ( ! current_user_can( 'administrator' ) ) {
remove_menu_page( 'jetpack' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment