WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/14/2008 10:44:56 PM (13 years ago)
Author:
ryan
Message:

Menu fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r9050 r9178  
    498498    $file = plugin_basename( $file );
    499499
    500     $menu[] = array ( $menu_title, $access_level, $file, $page_title );
    501 
    502500    $admin_page_hooks[$file] = sanitize_title( $menu_title );
    503501
     
    505503    if (!empty ( $function ) && !empty ( $hookname ))
    506504        add_action( $hookname, $function );
     505
     506    $menu[] = array ( $menu_title, $access_level, $file, $page_title, $hookname, $hookname );
    507507
    508508    return $hookname;
     
    661661
    662662    $parent = $parent1 = get_admin_page_parent();
     663
    663664    if ( empty ( $parent) ) {
    664665        foreach ( $menu as $menu_array ) {
     
    719720
    720721    $page_type = 'admin';
    721     if ( empty ( $parent_page ) || 'admin.php' == $parent_page ) {
    722         if ( isset( $admin_page_hooks[$plugin_page] ))
     722    if ( empty ( $parent_page ) || 'admin.php' == $parent_page || isset( $admin_page_hooks[$plugin_page] ) ) {
     723        if ( isset( $admin_page_hooks[$plugin_page] ) )
    723724            $page_type = 'toplevel';
    724725        else
Note: See TracChangeset for help on using the changeset viewer.