WordPress.org

Make WordPress Core

Ticket #21368: 21368.17.diff

File 21368.17.diff, 2.2 KB (added by lessbloat, 22 months ago)
  • wp-admin/includes/dashboard.php

     
    12421242                <p><?php _e( 'First, tweak the look of your site:' ); ?></p> 
    12431243                <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> 
    12441244                <?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?> 
    1245                         <p><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p> 
     1245                        <p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s" class="change-theme">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p> 
    12461246                <?php endif; ?> 
    12471247        </div> 
    12481248        <div class="welcome-panel-column"> 
  • wp-admin/js/dashboard.js

     
    2626                welcomePanel.toggleClass('hidden', ! this.checked ); 
    2727                updateWelcomePanel( this.checked ? 1 : 0 ); 
    2828        }); 
     29         
     30        // Replaces customizer link with link to themes page if customizer is not available 
     31        if ( $('body').hasClass('no-customize-support') ) 
     32                $('.welcome-button').prop('href', $('.change-theme').attr('href')); 
    2933 
    3034        // These widgets are sometimes populated via ajax 
    3135        ajaxWidgets = [ 
  • 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' ) || 'dashboard' == $current_screen->base ) 
     109        && current_user_can( 'edit_theme_options' ) ) 
    109110        wp_customize_support_script(); 
    110111?> 
    111112