Ignore index.php in plugins dir when creating menus. fixes #6478
git-svn-id: http://svn.automattic.com/wordpress/trunk@10510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
515fd53ef5
commit
4118b08835
|
@ -115,7 +115,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
|||
|
||||
$menu_hook = get_plugin_page_hook($sub_item[2], $item[2]);
|
||||
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$sub_item[2]}") || ! empty($menu_hook) ) {
|
||||
if ( ( file_exists(WP_PLUGIN_DIR . "/{$sub_item[2]}") && ('index.php' != $sub_item[2]) ) || ! empty($menu_hook) ) {
|
||||
// If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
|
||||
$parent_exists = (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/{$item[2]}") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}") ) || file_exists($item[2]);
|
||||
if ( $parent_exists )
|
||||
|
|
Loading…
Reference in New Issue