Skip to content

Instantly share code, notes, and snippets.

@dartiss
Last active April 24, 2020 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dartiss/f288847910e1fb7b39de84932d7af33d to your computer and use it in GitHub Desktop.
Save dartiss/f288847910e1fb7b39de84932d7af33d to your computer and use it in GitHub Desktop.
Add modules to Jetpack menu
/**
* Admin menu changes
*/
function add_menus() {
if ( class_exists( 'Jetpack' ) ) {
add_action( 'jetpack_admin_menu', 'add_jetpack_menu' );
}
}
add_action( 'admin_menu', 'add_menus', 5 );
/**
* Add a sub-menu to Jetpack for the modules
*/
function add_jetpack_menu() {
add_submenu_page(
'jetpack',
'Jetpack Modules',
'Modules',
'manage_options',
'jetpack_modules',
'jetpack'
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment