WordPress.org

Make WordPress Core

Ticket #16048: hook-_wp_menu_output-v2.diff

File hook-_wp_menu_output-v2.diff, 1.1 KB (added by mikeschinkel, 7 years ago)

Hooks _wp_menu_output(), adds test for CUSTOM_ADMIN_MENUS constant

  • wp-admin/menu-header.php

     
    167167
    168168<?php
    169169
    170 _wp_menu_output( $menu, $submenu );
    171 do_action( 'adminmenu' );
     170do_action( 'adminmenu', $menu, $submenu );
    172171
    173172?>
    174173</ul>
  • wp-admin/admin.php

     
    108108if ( current_user_can( 'manage_options' ) )
    109109        @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', '256M' ) );
    110110
     111add_filter('adminmenu','_wp_menu_output',0,2);
    111112do_action('admin_init');
    112113
    113114if ( isset($plugin_page) ) {
  • wp-admin/menu.php

     
    2121 * @name $menu
    2222 * @var array
    2323 */
     24if (defined('CUSTOM_ADMIN_MENUS'))
     25        return;
    2426
    2527$menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'div' );
    2628