wp/wp-admin/includes/class-theme-installer-skin.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-admin/includes/class-theme-installer-skin.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/includes/class-theme-installer-skin.php	Tue Sep 27 16:37:53 2022 +0200
@@ -115,7 +115,7 @@
 
 		$install_actions = array();
 
-		if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
+		if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) && ! $theme_info->is_block_theme() ) {
 			$customize_url = add_query_arg(
 				array(
 					'theme'  => urlencode( $stylesheet ),
@@ -223,7 +223,7 @@
 
 		echo '<h2 class="update-from-upload-heading">' . esc_html__( 'This theme is already installed.' ) . '</h2>';
 
-		// Check errors for current theme.
+		// Check errors for active theme.
 		if ( is_wp_error( $current_theme_data->errors() ) ) {
 			$this->feedback( 'current_theme_has_errors', $current_theme_data->errors()->get_error_message() );
 		}
@@ -245,7 +245,7 @@
 		);
 
 		$table  = '<table class="update-from-upload-comparison"><tbody>';
-		$table .= '<tr><th></th><th>' . esc_html_x( 'Current', 'theme' ) . '</th><th>' . esc_html_x( 'Uploaded', 'theme' ) . '</th></tr>';
+		$table .= '<tr><th></th><th>' . esc_html_x( 'Active', 'theme' ) . '</th><th>' . esc_html_x( 'Uploaded', 'theme' ) . '</th></tr>';
 
 		$is_same_theme = true; // Let's consider only these rows.
 
@@ -282,9 +282,9 @@
 		 *
 		 * @since 5.5.0
 		 *
-		 * @param string $table              The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
-		 * @param array  $current_theme_data Array with current theme data.
-		 * @param array  $new_theme_data     Array with uploaded theme data.
+		 * @param string   $table              The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
+		 * @param WP_Theme $current_theme_data Active theme data.
+		 * @param array    $new_theme_data     Array with uploaded theme data.
 		 */
 		echo apply_filters( 'install_theme_overwrite_comparison', $table, $current_theme_data, $new_theme_data );
 
@@ -327,7 +327,7 @@
 			if ( $this->is_downgrading ) {
 				$warning = sprintf(
 					/* translators: %s: Documentation URL. */
-					__( 'You are uploading an older version of a current theme. You can continue to install the older version, but be sure to <a href="%s">back up your database and files</a> first.' ),
+					__( 'You are uploading an older version of the active theme. You can continue to install the older version, but be sure to <a href="%s">back up your database and files</a> first.' ),
 					__( 'https://wordpress.org/support/article/wordpress-backups/' )
 				);
 			} else {
@@ -345,7 +345,7 @@
 			$install_actions['overwrite_theme'] = sprintf(
 				'<a class="button button-primary update-from-upload-overwrite" href="%s" target="_parent">%s</a>',
 				wp_nonce_url( add_query_arg( 'overwrite', $overwrite, $this->url ), 'theme-upload' ),
-				_x( 'Replace current with uploaded', 'theme' )
+				_x( 'Replace active with uploaded', 'theme' )
 			);
 		} else {
 			echo $blocked_message;