Themes: Hide block themes' live preview link following installation.

Prevent the Customizer/Live Preview button from showing for installed block themes when on the theme installation page.

Props antonvlasenko, costdev, ironprogrammer.
Fixes #54878.



git-svn-id: https://develop.svn.wordpress.org/trunk@52819 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson
2022-03-04 02:37:58 +00:00
parent 77561d0a30
commit 567b2518f8
3 changed files with 34 additions and 5 deletions

View File

@@ -622,6 +622,9 @@ themes.view.Theme = wp.Backbone.View.extend({
if ( _this.model.get( 'id' ) === response.slug ) {
_this.model.set( { 'installed': true } );
}
if ( response.blockTheme ) {
_this.model.set( { 'block_theme': true } );
}
} );
wp.updates.installTheme( {