Generic Jetpack wp-admin UI elements

Installs: 1 379 503

Dependents: 7

Suggesters: 0

Security: 0

Stars: 3

Watchers: 4

Forks: 2


v0.4.2 2024-04-22 18:47 UTC


Generic Jetpack wp-admin UI elements

How to use

Menu Registration

Use the Admin_Menu class to add your plugin under the Jetpack top level menu in WP-Admin.

This package will make sure to register the top level menu, if not registered yet, and will add the new menu(s) item(s) under it.

Use the add_menu to register your menu, no need to do it inside the admin_menu hook. You can do it in your plugin initialization.

The parameters this method gets are the same parameters add_submenu_page gets, except that you don't need to inform parent menu.


use Automattic\Jetpack\Admin_UI\Admin_Menu;

$page_suffix = Admin_Menu::add_menu(
	__( 'My Awesome plugin', 'my-awesome-plugin' ),
	__( 'My Awesome plugin', 'my-awesome-plugin' ),
add_action( 'load-' . $page_suffix, 'my_plugin_do_stuff_on_page_load' );


Need to report a security vulnerability? Go to or directly to our security bug bounty site


admin-ui is licensed under GNU General Public License v2 (or later)