WordPress.org

Make WordPress Core

Ticket #21368: 21368.16.no-customize.diff

File 21368.16.no-customize.diff, 1.6 KB (added by DrewAPicture, 6 years ago)

First-pass: Adds hide-if-no-customize to primary button

  • wp-admin/includes/dashboard.php

     
    12401240        <div class="welcome-panel-column">
    12411241                <h4><?php _e( 'Get Started' ); ?></h4>
    12421242                <p><?php _e( 'First, tweak the look of your site:' ); ?></p>
    1243                 <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>
     1243                <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>
    12441244                <?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?>
    12451245                        <p><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p>
    12461246                <?php endif; ?>
  • wp-admin/admin-header.php

     
    105105<?php
    106106// If the customize-loader script is enqueued, make sure the customize
    107107// body classes are correct as early as possible.
    108 if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_theme_options' ) )
     108if ( ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_theme_options' ) )
     109                || $current_screen->base == 'dashboard' )
    109110        wp_customize_support_script();
    110111?>
    111112