diff -r be944660c56a -r 3d72ae0968f4 wp/wp-admin/includes/class-theme-installer-skin.php --- 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 '

' . esc_html__( 'This theme is already installed.' ) . '

'; - // 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 .= ''; + $table .= ''; $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 back up your database and files first.' ), + __( 'You are uploading an older version of the active theme. You can continue to install the older version, but be sure to back up your database and files first.' ), __( 'https://wordpress.org/support/article/wordpress-backups/' ) ); } else { @@ -345,7 +345,7 @@ $install_actions['overwrite_theme'] = sprintf( '%s', 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;
' . esc_html_x( 'Current', 'theme' ) . '' . esc_html_x( 'Uploaded', 'theme' ) . '
' . esc_html_x( 'Active', 'theme' ) . '' . esc_html_x( 'Uploaded', 'theme' ) . '