Changeset 51022 for trunk/src/wp-admin/menu.php
- Timestamp:
- 05/26/2021 01:16:51 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/menu.php
r49837 r51022 186 186 $appearance_cap = current_user_can( 'switch_themes' ) ? 'switch_themes' : 'edit_theme_options'; 187 187 188 $menu[60] = array( __( 'Appearance' ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' ); 189 $submenu['themes.php'][5] = array( __( 'Themes' ), $appearance_cap, 'themes.php' ); 188 $menu[60] = array( __( 'Appearance' ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' ); 189 190 $count = ''; 191 if ( ! is_multisite() && current_user_can( 'update_themes' ) ) { 192 if ( ! isset( $update_data ) ) { 193 $update_data = wp_get_update_data(); 194 } 195 $count = sprintf( 196 '<span class="update-plugins count-%s"><span class="theme-count">%s</span></span>', 197 $update_data['counts']['themes'], 198 number_format_i18n( $update_data['counts']['themes'] ) 199 ); 200 } 201 202 /* translators: %s: Number of available theme updates. */ 203 $submenu['themes.php'][5] = array( sprintf( __( 'Themes %s' ), $count ), $appearance_cap, 'themes.php' ); 190 204 191 205 $customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' ); … … 237 251 } 238 252 239 /* translators: %s: Number of pendingplugin updates. */253 /* translators: %s: Number of available plugin updates. */ 240 254 $menu[65] = array( sprintf( __( 'Plugins %s' ), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' ); 241 255
Note: See TracChangeset
for help on using the changeset viewer.