Last active
April 24, 2020 11:45
-
-
Save dartiss/f288847910e1fb7b39de84932d7af33d to your computer and use it in GitHub Desktop.
Add modules to Jetpack menu
This file contains hidden or 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
/** | |
* 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