do_action( 'admin_menu', string $context )

Fires before the administration menu loads in the admin.


Description Description


Parameters Parameters

$context

(string) Empty context.


Top ↑

Source Source

File: wp-admin/includes/menu.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Aurovrata Venet

    If you want to change a menu label, you can hook this action and change the global $menu, $submenu values,

    add_action( 'admin_menu', 'change_media_label' );
    function change_media_label(){
      global $menu, $submenu;
      debug_msg($menu);
      $menu[10][0] = 'Photos/Videos';
      $submenu['upload.php'][5][0] = 'All Photos/Videos';
      $submenu['upload.php'][10][0] = 'Upload new';
    }
    

You must log in before being able to contribute a note or feedback.