Make WordPress Core

Ticket #43697: 43697.4.diff

File 43697.4.diff, 1.4 KB (added by zodiac1978, 4 years ago)

Corrected wrong comment text.

  • src/wp-admin/menu.php

     
    185185
    186186$appearance_cap = current_user_can( 'switch_themes' ) ? 'switch_themes' : 'edit_theme_options';
    187187
    188 $menu[60]                     = array( __( 'Appearance' ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
     188$theme_update_count = '';
     189if ( ! is_multisite() && current_user_can( 'update_themes' ) ) {
     190        if ( ! isset( $update_data ) ) {
     191                $update_data = wp_get_update_data();
     192        }
     193        $theme_update_count = sprintf(
     194                '<span class="update-plugins count-%s"><span class="theme-count">%s</span></span>',
     195                $update_data['counts']['themes'],
     196                number_format_i18n( $update_data['counts']['themes'] )
     197        );
     198}
     199
     200/* translators: %s: Number of pending theme updates. */
     201$menu[60] = array( sprintf( __( 'Appearance %s' ), $theme_update_count ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
     202
    189203        $submenu['themes.php'][5] = array( __( 'Themes' ), $appearance_cap, 'themes.php' );
    190204
    191205        $customize_url            = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' );