admin_menu WordPress Action Hook

The admin_menu hook allows you to add new menus to the WordPress admin area. This hook is triggered when the admin menu is being loaded.

do_action( 'admin_menu', string $context ) #

Fires before the administration menu loads in the admin.


Parameters

$context

(string)Empty context.


Top ↑

More Information

  • This action is used to add extra submenus and menu options to the admin panel’s menu structure. It runs after the basic admin panel menu structure is in place.
  • This action mustn’t be placed in an admin_init action function because the admin_init action is called after admin_menu.

Top ↑

Source

File: wp-admin/includes/menu.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.