WordPress.org

Make WordPress Core

Changeset 10510


Ignore:
Timestamp:
02/05/2009 09:02:46 PM (12 years ago)
Author:
ryan
Message:

Ignore index.php in plugins dir when creating menus. fixes #6478

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu-header.php

    r10123 r10510  
    116116                $menu_hook = get_plugin_page_hook($sub_item[2], $item[2]);
    117117
    118                 if ( file_exists(WP_PLUGIN_DIR . "/{$sub_item[2]}") || ! empty($menu_hook) ) {
     118                if ( ( file_exists(WP_PLUGIN_DIR . "/{$sub_item[2]}") && ('index.php' != $sub_item[2]) ) || ! empty($menu_hook) ) {
    119119                    // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
    120120                    $parent_exists = (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/{$item[2]}") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}") ) || file_exists($item[2]);
Note: See TracChangeset for help on using the changeset viewer.