Ticket #21368: 21368.16.1.no-customize.diff

File 21368.16.1.no-customize.diff, 1.6 KB (added by DrewAPicture, 8 months ago)

Fixes admin-header checks

Line 
1Index: wp-admin/includes/dashboard.php
2===================================================================
3--- wp-admin/includes/dashboard.php     (revision 22085)
4+++ wp-admin/includes/dashboard.php     (working copy)
5@@ -1240,7 +1240,7 @@
6        <div class="welcome-panel-column">
7                <h4><?php _e( 'Get Started' ); ?></h4>
8                <p><?php _e( 'First, tweak the look of your site:' ); ?></p>
9-               <a class="button-primary welcome-button" href="<?php echo add_query_arg( 'url', urlencode( admin_url( '/' ) ), wp_customize_url() ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
10+               <a class="button-primary welcome-button hide-if-no-customize" href="<?php echo add_query_arg( 'url', urlencode( admin_url( '/' ) ), wp_customize_url() ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
11                <?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?>
12                        <p><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p>
13                <?php endif; ?>
14Index: wp-admin/admin-header.php
15===================================================================
16--- wp-admin/admin-header.php   (revision 22085)
17+++ wp-admin/admin-header.php   (working copy)
18@@ -105,7 +105,8 @@
19 <?php
20 // If the customize-loader script is enqueued, make sure the customize
21 // body classes are correct as early as possible.
22-if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_theme_options' ) )
23+if ( ( wp_script_is( 'customize-loader', 'queue' ) || 'dashboard' == $current_screen->base )
24+       && current_user_can( 'edit_theme_options' ) )
25        wp_customize_support_script();
26 ?>
27