automattic/jetpack-admin-ui
Generic Jetpack wp-admin UI elements
Maintainers
Package info
github.com/Automattic/jetpack-admin-ui
Type:jetpack-library
pkg:composer/automattic/jetpack-admin-ui
Requires
- php: >=7.2
- automattic/jetpack-redirect: ^3.0.15
- automattic/jetpack-status: ^6.1.8
Requires (Dev)
- automattic/jetpack-logo: ^3.0.9
- automattic/jetpack-test-environment: @dev
- automattic/phpunit-select-config: ^1.0.9
- yoast/phpunit-polyfills: ^4.0.0
Suggests
- automattic/jetpack-autoloader: Allow for better interoperability with other plugins that use this package.
Provides
None
Conflicts
None
Replaces
None
GPL-2.0-or-later 5780cbf733d59c396d462e5cfbab8ab40dd16fba
This package is auto-updated.
Last update: 2026-06-17 16:04:59 UTC
README
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.
Example:
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' ), 'manage_options', 'my-awesome-plugin', '__my_plugin_page_callback' ); add_action( 'load-' . $page_suffix, 'my_plugin_do_stuff_on_page_load' );
Security
Need to report a security vulnerability? Go to https://automattic.com/security/ or directly to our security bug bounty site https://hackerone.com/automattic.
License
admin-ui is licensed under GNU General Public License v2 (or later)
