Make WordPress Core

Changeset 52802


Ignore:
Timestamp:
02/26/2022 08:14:22 AM (2 years ago)
Author:
audrasjb
Message:

Themes: Remove the Live Preview link when installing a block theme from a zip archive.

This changeset removes the Live Preview link for block-based themes when installing for a zip archive, since the customizer is disabled by default for block themes.

Follow-up to [52353].

Props alanjacobmathew, hellofromTonya, antonvlasenko, ironprogrammer.
Fixes #54578.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-theme-installer-skin.php

    r52610 r52802  
    116116        $install_actions = array();
    117117
    118         if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
     118        if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) && ! $theme_info->is_block_theme() ) {
    119119            $customize_url = add_query_arg(
    120120                array(
Note: See TracChangeset for help on using the changeset viewer.