Skip to content

Instantly share code, notes, and snippets.

@JiveDig
Created May 10, 2013 20:03
Show Gist options
  • Save JiveDig/5557004 to your computer and use it in GitHub Desktop.
Save JiveDig/5557004 to your computer and use it in GitHub Desktop.
Remove Jetpack module from Dashboard for non-admins
// Remove Jetpack module from Dashboard for non-admins
function ap_remove_jetpack_page( ) {
if ( class_exists( 'Jetpack' ) && !current_user_can( 'manage_options' ) ) {
remove_menu_page( 'jetpack' );
}
}
add_action( 'admin_menu', 'ap_remove_jetpack_page', 999 );
// Disable OpenGraph in Jetback as written here: http://yoast.com/jetpack-and-wordpress-seo/
add_filter( 'jetpack_enable_opengraph', '__return_false', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment