mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 05:04:31 +00:00
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:
@@ -35,9 +35,10 @@ if ( false === $installed_themes ) {
|
||||
$installed_themes = array();
|
||||
}
|
||||
|
||||
foreach ( $installed_themes as $k => $v ) {
|
||||
if ( false !== strpos( $k, '/' ) ) {
|
||||
unset( $installed_themes[ $k ] );
|
||||
foreach ( $installed_themes as $theme_slug => $theme_data ) {
|
||||
// Ignore child themes.
|
||||
if ( str_contains( $theme_slug, '/' ) ) {
|
||||
unset( $installed_themes[ $theme_slug ] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +374,9 @@ if ( $tab ) {
|
||||
<# } #>
|
||||
<# if ( data.customize_url ) { #>
|
||||
<# if ( ! data.active ) { #>
|
||||
<a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
|
||||
<# if ( ! data.block_theme ) { #>
|
||||
<a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
|
||||
<# } #>
|
||||
<# } else { #>
|
||||
<a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Customize' ); ?></a>
|
||||
<# } #>
|
||||
|
||||
Reference in New Issue
Block a user