Make WordPress Core

Changeset 52803 for branches/5.9


Ignore:
Timestamp:
02/26/2022 08:27:50 AM (3 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.

Location:
branches/5.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

  • branches/5.9/src/wp-admin/includes/class-theme-installer-skin.php

    r52204 r52803  
    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.