Ticket #5001: admin-menu.diff
File admin-menu.diff, 2.1 KB (added by , 17 years ago) |
---|
-
E:/EclipseWorkWeb/WordPressDev/wp-admin/menu-header.php
3 3 $self = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']); 4 4 $self = preg_replace('|^.*/plugins/|i', '', $self); 5 5 6 // Reset parent file variable, as it may be set incorrectly 7 // during plugin inits 8 $parent_file = ''; 9 6 10 get_admin_page_parent(); 7 11 8 12 foreach ($menu as $item) { -
E:/EclipseWorkWeb/WordPressDev/wp-admin/includes/plugin.php
217 217 $parent_file = $parent; 218 218 return $parent; 219 219 } else 220 if ( isset( $plugin_page ) && ($plugin_page == $submenu_array[2] ) ) { 220 if ( isset( $plugin_page ) && ($plugin_page == $submenu_array[2] ) 221 && (( $pagenow == $parent ) || ( $pagenow == 'admin.php'))) { 221 222 $parent_file = $parent; 222 223 return $parent; 223 224 } … … 299 300 function get_plugin_page_hookname( $plugin_page, $parent_page ) { 300 301 global $admin_page_hooks; 301 302 303 $parent_file = ''; 302 304 $parent = get_admin_page_parent(); 303 305 304 306 if ( empty ( $parent_page ) || 'admin.php' == $parent_page ) { -
E:/EclipseWorkWeb/WordPressDev/wp-admin/admin.php
41 41 if (isset($plugin_page)) { 42 42 $page_hook = get_plugin_page_hook($plugin_page, $pagenow); 43 43 44 // if this did not work, try using the parent file instead of $pagenow, which is probably set to admin.php 45 if( !$page_hook ) { 46 $page_hook = get_plugin_page_hook( $plugin_page, $parent_file ); 47 } 48 44 49 if ( $page_hook ) { 45 50 do_action('load-' . $page_hook); 46 51 if (! isset($_GET['noheader']))