X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/607b7e02d77e7326161e8ec15639052d2040f745..refs/heads/pristine:/wp-admin/themes.php diff --git a/wp-admin/themes.php b/wp-admin/themes.php index c601cd55..6aa129d7 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -89,7 +89,7 @@ if ( current_user_can( 'install_themes' ) ) { if ( is_multisite() ) { $help_install = '

' . __('Installing themes on Multisite can only be done from the Network Admin section.') . '

'; } else { - $help_install = '

' . sprintf( __('If you would like to see more themes to choose from, click on the “Add New” button and you will be able to browse or search for additional themes from the WordPress Theme Directory. Themes in the WordPress Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!'), 'https://wordpress.org/themes/' ) . '

'; + $help_install = '

' . sprintf( __('If you would like to see more themes to choose from, click on the “Add New” button and you will be able to browse or search for additional themes from the WordPress Theme Directory. Themes in the WordPress Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!'), __( 'https://wordpress.org/themes/' ) ) . '

'; } get_current_screen()->add_help_tab( array( @@ -115,8 +115,8 @@ if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) get_current_screen()->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Using Themes' ) . '

' . - '

' . __( 'Support Forums' ) . '

' + '

' . __( 'Documentation on Using Themes' ) . '

' . + '

' . __( 'Support Forums' ) . '

' ); if ( current_user_can( 'switch_themes' ) ) { @@ -177,7 +177,7 @@ endif; $ct = wp_get_theme(); if ( $ct->errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) { - echo '

' . sprintf( __( 'ERROR: %s' ), $ct->errors()->get_error_message() ) . '

'; + echo '

' . __( 'ERROR:' ) . ' ' . $ct->errors()->get_error_message() . '

'; } /* @@ -200,17 +200,17 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() ) $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index. $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]); if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; else - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) { $menu_file = $item[2]; if ( current_user_can( 'customize' ) ) { if ( 'custom-header' === $menu_file ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } elseif ( 'custom-background' === $menu_file ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } } @@ -219,9 +219,9 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() ) } if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } else { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } } } @@ -252,7 +252,11 @@ foreach ( $themes as $theme ) :
+

Update now' ); ?>

+ +

+
@@ -281,7 +285,7 @@ foreach ( $themes as $theme ) : /* translators: %s: Theme name */ $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); ?> - + @@ -333,7 +337,7 @@ $can_install = current_user_can( 'install_themes' ); ), admin_url( 'themes.php' ) ); $delete_url = wp_nonce_url( $delete_url, 'delete-theme_' . $stylesheet ); ?> - + - + <# if ( data.hasUpdate ) { #> -

Update now' ); ?>

+ <# if ( data.hasPackage ) { #> +

Update now' ); ?>

+ <# } else { #> +

+ <# } #> <# } #> @@ -410,7 +418,7 @@ $can_install = current_user_can( 'install_themes' ); /* translators: %s: Theme name */ $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); ?> - + <# } #> @@ -469,13 +477,13 @@ $can_install = current_user_can( 'install_themes' ); $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); ?> <# if ( data.actions.activate ) { #> - + <# } #> <# if ( ! data.active && data.actions['delete'] ) { #> - + <# } #> @@ -486,4 +494,8 @@ wp_print_request_filesystem_credentials_modal(); wp_print_admin_notice_templates(); wp_print_update_row_templates(); +wp_localize_script( 'updates', '_wpUpdatesItemCounts', array( + 'totals' => wp_get_update_data(), +) ); + require( ABSPATH . 'wp-admin/admin-footer.php' );