diff -Naur old/menu.php new/menu.php
old
|
new
|
|
168 | 168 | $appearance_cap = current_user_can( 'switch_themes' ) ? 'switch_themes' : 'edit_theme_options'; |
169 | 169 | |
170 | 170 | $menu[60] = array( __( 'Appearance' ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' ); |
171 | | $submenu['themes.php'][5] = array( __( 'Themes' ), $appearance_cap, 'themes.php' ); |
| 171 | $theme_update_count = ''; |
| 172 | if ( ! is_multisite() && current_user_can( 'update_plugins' ) ) { |
| 173 | if ( ! isset( $update_data ) ) { |
| 174 | $update_data = wp_get_update_data(); |
| 175 | } |
| 176 | $theme_update_count = "<span class='update-plugins count-{$update_data['counts']['themes']}'><span class='theme-count'>" . number_format_i18n( $update_data['counts']['themes'] ) . '</span></span>'; |
| 177 | } |
| 178 | $submenu['themes.php'][5] = array( sprintf( __('Themes %s'), $theme_update_count ), $appearance_cap, 'themes.php' ); |
172 | 179 | |
173 | 180 | $customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' ); |
174 | 181 | $submenu['themes.php'][6] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' ); |