Changeset 21877
- Timestamp:
- 09/16/2012 10:51:44 PM (12 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r21838 r21877 885 885 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 886 886 * @param callback $function The function to be called to output the content for this page. 887 * @param string $icon_url The url to the icon to be used for this menu 887 * @param string $icon_url The url to the icon to be used for this menu. Using 'none' would leave div.wp-menu-image empty 888 * so an icon can be added as background with CSS. 888 889 * @param int $position The position in the menu order this one should appear 889 890 * -
trunk/wp-admin/menu-header.php
r21574 r21877 69 69 $id = ! empty( $item[5] ) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : ''; 70 70 $img = ''; 71 // if the string 'none' (previously 'div') is passed instead of an URL, don't output the default menu image 72 // so an icon can be added to div.wp-menu-image as background with CSS. 71 73 if ( ! empty( $item[6] ) ) 72 $img = ( ' div' === $item[6] ) ? '<br />' : '<img src="' . $item[6] . '" alt="" />';74 $img = ( 'none' === $item[6] || 'div' === $item[6] ) ? '<br />' : '<img src="' . $item[6] . '" alt="" />'; 73 75 $arrow = '<div class="wp-menu-arrow"><div></div></div>'; 74 76 -
trunk/wp-admin/menu.php
r21838 r21877 23 23 */ 24 24 25 $menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', ' div' );25 $menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'none' ); 26 26 27 27 $submenu[ 'index.php' ][0] = array( __('Home'), 'read', 'index.php' ); … … 47 47 $menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' ); 48 48 49 $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top menu-icon-post', 'menu-posts', ' div' );49 $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top menu-icon-post', 'menu-posts', 'none' ); 50 50 $submenu['edit.php'][5] = array( __('All Posts'), 'edit_posts', 'edit.php' ); 51 51 /* translators: add new post */ … … 61 61 unset($tax); 62 62 63 $menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', ' div' );63 $menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'none' ); 64 64 $submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php'); 65 65 /* translators: add new file */ 66 66 $submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php'); 67 67 68 $menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', ' div' );68 $menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'none' ); 69 69 $submenu['link-manager.php'][5] = array( _x('All Links', 'admin menu'), 'manage_links', 'link-manager.php' ); 70 70 /* translators: add new links */ … … 72 72 $submenu['link-manager.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-tags.php?taxonomy=link_category' ); 73 73 74 $menu[20] = array( __('Pages'), 'edit_pages', 'edit.php?post_type=page', '', 'menu-top menu-icon-page', 'menu-pages', ' div' );74 $menu[20] = array( __('Pages'), 'edit_pages', 'edit.php?post_type=page', '', 'menu-top menu-icon-page', 'menu-pages', 'none' ); 75 75 $submenu['edit.php?post_type=page'][5] = array( __('All Pages'), 'edit_pages', 'edit.php?post_type=page' ); 76 76 /* translators: add new page */ … … 87 87 $awaiting_mod = wp_count_comments(); 88 88 $awaiting_mod = $awaiting_mod->moderated; 89 $menu[25] = array( sprintf( __('Comments %s'), "<span class='awaiting-mod count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', ' div' );89 $menu[25] = array( sprintf( __('Comments %s'), "<span class='awaiting-mod count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', 'none' ); 90 90 unset($awaiting_mod); 91 91 … … 105 105 $ptype_class = $ptype_for_id; 106 106 } else { 107 $menu_icon = ' div';107 $menu_icon = 'none'; 108 108 $ptype_class = 'post'; 109 109 } … … 131 131 132 132 if ( current_user_can( 'switch_themes') ) { 133 $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', ' div' );133 $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'none' ); 134 134 $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php'); 135 135 if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) 136 136 $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php'); 137 137 } else { 138 $menu[60] = array( __('Appearance'), 'edit_theme_options', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', ' div' );138 $menu[60] = array( __('Appearance'), 'edit_theme_options', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'none' ); 139 139 $submenu['themes.php'][5] = array(__('Themes'), 'edit_theme_options', 'themes.php'); 140 140 if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) … … 157 157 } 158 158 159 $menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', ' div' );159 $menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'none' ); 160 160 161 161 $submenu['plugins.php'][5] = array( __('Installed Plugins'), 'activate_plugins', 'plugins.php' ); … … 170 170 171 171 if ( current_user_can('list_users') ) 172 $menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', ' div' );172 $menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'none' ); 173 173 else 174 $menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', ' div' );174 $menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'none' ); 175 175 176 176 if ( current_user_can('list_users') ) { … … 192 192 } 193 193 194 $menu[75] = array( __('Tools'), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', ' div' );194 $menu[75] = array( __('Tools'), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'none' ); 195 195 $submenu['tools.php'][5] = array( __('Available Tools'), 'edit_posts', 'tools.php' ); 196 196 $submenu['tools.php'][10] = array( __('Import'), 'import', 'import.php' ); … … 201 201 $submenu['tools.php'][50] = array(__('Network Setup'), 'manage_options', 'network.php'); 202 202 203 $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', ' div' );203 $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'none' ); 204 204 $submenu['options-general.php'][10] = array(_x('General', 'settings screen'), 'manage_options', 'options-general.php'); 205 205 $submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
Note: See TracChangeset
for help on using the changeset viewer.