Changeset 6558
- Timestamp:
- 01/05/2008 12:17:35 AM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 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 -
trunk/wp-admin/menu.php
r6555 r6558 19 19 if ( 100 < $awaiting_mod ) 20 20 $awaiting_mod = '99+'; // to not blow out layout 21 $menu[15] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='comment-count'>$awaiting_mod</span>" ), 'edit_posts', 'edit-comments.php');22 $menu[2 5] = array(__('Design'), 'switch_themes', 'themes.php');21 $menu[15] = array(__('Design'), 'switch_themes', 'themes.php'); 22 $menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='comment-count'>$awaiting_mod</span>" ), 'edit_posts', 'edit-comments.php'); 23 23 $menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); 24 24 if ( current_user_can('edit_users') )
Note: See TracChangeset
for help on using the changeset viewer.