Changeset 6558 for trunk/wp-admin/menu-header.php
- Timestamp:
- 01/05/2008 12:17:35 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/menu-header.php
r6549 r6558 60 60 } 61 61 } 62 63 foreach ( $menu as $key => $item ) { 64 if ( $key < 41 ) // there is a more efficient way to do this! 65 continue; 66 67 $class = ''; 68 69 // 0 = name, 1 = capability, 2 = file 70 if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"'; 71 72 if ( !empty($submenu[$item[2]]) ) { 73 $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index. 74 $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]); 75 if ( file_exists(ABSPATH . PLUGINDIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) 76 echo "\n\t<li><a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>"; 77 else 78 echo "\n\t<li><a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>"; 79 } else if ( current_user_can($item[1]) ) { 80 if ( file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") ) 81 echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>"; 82 else 83 echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>"; 84 } 85 } 86 62 87 do_action( 'adminmenu' ); 63 88 ?> … … 67 92 <?php 68 93 foreach ( $menu as $key => $item ) { 69 if ( 26 > $key ) // get each menu item before 394 if ( 26 > $key || $key > 40 ) 70 95 continue; 71 96
Note: See TracChangeset
for help on using the changeset viewer.