Changeset 9178
- Timestamp:
- 10/14/2008 10:44:56 PM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r9050 r9178 498 498 $file = plugin_basename( $file ); 499 499 500 $menu[] = array ( $menu_title, $access_level, $file, $page_title );501 502 500 $admin_page_hooks[$file] = sanitize_title( $menu_title ); 503 501 … … 505 503 if (!empty ( $function ) && !empty ( $hookname )) 506 504 add_action( $hookname, $function ); 505 506 $menu[] = array ( $menu_title, $access_level, $file, $page_title, $hookname, $hookname ); 507 507 508 508 return $hookname; … … 661 661 662 662 $parent = $parent1 = get_admin_page_parent(); 663 663 664 if ( empty ( $parent) ) { 664 665 foreach ( $menu as $menu_array ) { … … 719 720 720 721 $page_type = 'admin'; 721 if ( empty ( $parent_page ) || 'admin.php' == $parent_page ) {722 if ( isset( $admin_page_hooks[$plugin_page] ) )722 if ( empty ( $parent_page ) || 'admin.php' == $parent_page || isset( $admin_page_hooks[$plugin_page] ) ) { 723 if ( isset( $admin_page_hooks[$plugin_page] ) ) 723 724 $page_type = 'toplevel'; 724 725 else -
trunk/wp-admin/menu-header.php
r9154 r9178 52 52 } 53 53 54 if ( isset($item[ 3]) && ! empty($item[3]) )55 $class[] = $item[ 3];54 if ( isset($item[4]) && ! empty($item[4]) ) 55 $class[] = $item[4]; 56 56 57 57 $class = $class ? ' class="' . join( ' ', $class ) . '"' : ''; 58 $id = isset($item[ 4]) && ! empty($item[4]) ? ' id="' . $item[4] . '"' : '';59 $img = isset($item[ 5]) && ! empty($item[5]) ? '<img class="wp-menu-image" src="' . $item[5] . '" alt="" />' : '';58 $id = isset($item[5]) && ! empty($item[5]) ? ' id="' . $item[5] . '"' : ''; 59 $img = isset($item[6]) && ! empty($item[6]) ? '<img class="wp-menu-image" src="' . $item[6] . '" alt="" />' : ''; 60 60 61 61 echo "\n\t<li$class$id>"; -
trunk/wp-admin/menu.php
r9176 r9178 25 25 $awaiting_mod = $awaiting_mod->moderated; 26 26 27 $menu[0] = array( __('Dashboard'), 'read', 'index.php', ' wp-menu-open', 'menu-dashboard', 'images/menu/home.png' );27 $menu[0] = array( __('Dashboard'), 'read', 'index.php', '', 'wp-menu-open', 'menu-dashboard', 'images/menu/home.png' ); 28 28 $submenu['index.php'][5] = array( __('Dashboard'), 'read' , 'index.php' ); 29 29 30 $menu[4] = array( '', 'read', '', ' wp-menu-separator' );30 $menu[4] = array( '', 'read', '', '', 'wp-menu-separator' ); 31 31 32 $menu[5] = array( __('Posts'), 'edit_posts', 'post-new.php', ' wp-menu-open', 'menu-posts', 'images/menu/posts.png' );32 $menu[5] = array( __('Posts'), 'edit_posts', 'post-new.php', '', 'wp-menu-open', 'menu-posts', 'images/menu/posts.png' ); 33 33 $submenu['post-new.php'][5] = array( __('Add New'), 'edit_posts', 'post-new.php' ); 34 34 //$submenu['post-new.php'][10] = array( __('Drafts'), 'edit_posts', 'edit-post-drafts.php' ); … … 37 37 $submenu['post-new.php'][25] = array( __('Categories'), 'manage_categories', 'categories.php' ); 38 38 39 $menu[10] = array( __('Media'), 'upload_files', 'media-new.php', '', ' menu-media', 'images/menu/media.png' );39 $menu[10] = array( __('Media'), 'upload_files', 'media-new.php', '', '', 'menu-media', 'images/menu/media.png' ); 40 40 $submenu['media-new.php'][5] = array( __('Add New'), 'upload_files', 'media-new.php'); 41 41 $submenu['media-new.php'][10] = array( __('Edit'), 'upload_files', 'upload.php'); 42 42 43 $menu[15] = array( __('Links'), 'manage_links', 'link-add.php', '', ' menu-links', 'images/menu/links.png' );43 $menu[15] = array( __('Links'), 'manage_links', 'link-add.php', '', '', 'menu-links', 'images/menu/links.png' ); 44 44 $submenu['link-add.php'][5] = array( __('Add New'), 'manage_links', 'link-add.php' ); 45 45 $submenu['link-add.php'][10] = array( __('Edit'), 'manage_links', 'link-manager.php' ); 46 46 $submenu['link-add.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-link-categories.php' ); 47 47 48 $menu[20] = array( __('Pages'), 'edit_pages', 'page-new.php', '', ' menu-pages', 'images/menu/pages.png' );48 $menu[20] = array( __('Pages'), 'edit_pages', 'page-new.php', '', '', 'menu-pages', 'images/menu/pages.png' ); 49 49 $submenu['page-new.php'][5] = array( __('Add New'), 'edit_pages', 'page-new.php' ); 50 50 //$submenu['page-new.php'][10] = array( __('Drafts'), 'edit_pages', 'edit-page-drafts.php' ); 51 51 $submenu['page-new.php'][15] = array( __('Edit'), 'edit_pages', 'edit-pages.php' ); 52 52 53 $menu[25] = array( __('Comments'), 'edit_posts', 'edit-comments.php', '', ' menu-comments', 'images/menu/comments.png' );53 $menu[25] = array( __('Comments'), 'edit_posts', 'edit-comments.php', '', '', 'menu-comments', 'images/menu/comments.png' ); 54 54 $submenu['edit-comments.php'][15] = array( __('Comments'), 'edit_posts', 'edit-comments.php' ); 55 55 56 $menu[29] = array( '', 'read', '', ' wp-menu-separator' );56 $menu[29] = array( '', 'read', '', '', 'wp-menu-separator' ); 57 57 58 $menu[30] = array( __('Appearance'), 'switch_themes', 'themes.php', '', ' menu-appearance', 'images/menu/appearance.png' );58 $menu[30] = array( __('Appearance'), 'switch_themes', 'themes.php', '', '', 'menu-appearance', 'images/menu/appearance.png' ); 59 59 $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php'); 60 60 $submenu['themes.php'][10] = array(__('Editor'), 'edit_themes', 'theme-editor.php'); 61 61 62 $menu[35] = array( __('Plugins'), 'activate_plugins', 'plugins.php', '', ' menu-plugins', 'images/menu/plugins.png' );62 $menu[35] = array( __('Plugins'), 'activate_plugins', 'plugins.php', '', '', 'menu-plugins', 'images/menu/plugins.png' ); 63 63 $submenu['plugins.php'][15] = array(__('Add New'), 'install_plugins', 'plugin-install.php'); 64 64 $submenu['plugins.php'][5] = array( __('Installed'), 'activate_plugins', 'plugins.php' ); … … 66 66 67 67 if ( current_user_can('edit_users') ) 68 $menu[40] = array( __('Users'), 'edit_users', 'users.php', '', ' menu-users', 'images/menu/users.png' );68 $menu[40] = array( __('Users'), 'edit_users', 'users.php', '', '', 'menu-users', 'images/menu/users.png' ); 69 69 else 70 $menu[40] = array( __('Profile'), 'read', 'profile.php', '', ' menu-users', 'images/menu/users.png' );70 $menu[40] = array( __('Profile'), 'read', 'profile.php', '', '', 'menu-users', 'images/menu/users.png' ); 71 71 72 72 if ( current_user_can('edit_users') ) { … … 79 79 } 80 80 81 $menu[45] = array( __('Tools'), 'manage_options', 'import.php', '', ' menu-tools', 'images/menu/tools.png' );81 $menu[45] = array( __('Tools'), 'manage_options', 'import.php', '', '', 'menu-tools', 'images/menu/tools.png' ); 82 82 $submenu['import.php'][5] = array( __('Import'), 'import', 'import.php' ); 83 83 $submenu['import.php'][10] = array( __('Export'), 'import', 'export.php' ); … … 86 86 $submenu['import.php'][20] = array( __('Turbo'), 'read', 'turbo.php' ); 87 87 88 $menu[50] = array( __('Settings'), 'manage_options', 'options-general.php', '', ' menu-settings', 'images/menu/settings.png' );88 $menu[50] = array( __('Settings'), 'manage_options', 'options-general.php', '', '', 'menu-settings', 'images/menu/settings.png' ); 89 89 $submenu['options-general.php'][10] = array(__('General'), 'manage_options', 'options-general.php'); 90 90 $submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php'); … … 163 163 $_wp_menu_nopriv[$data[2]] = true; 164 164 unset($menu[$id]); 165 } elseif ( !empty($data[0]) ) { 166 $submenu[$data[2]][0] = $data; 165 167 } 166 168 }
Note: See TracChangeset
for help on using the changeset viewer.