Make WordPress Core

Ticket #42050: 42050.diff

File 42050.diff, 1.5 KB (added by celloexpressions, 7 years ago)

Deep-link to themes in the customizer, instead of wp-admin installed themes.

  • src/wp-admin/includes/dashboard.php

     
    15671567        <p class="about-description"><?php _e( 'We&#8217;ve assembled some links to get you started:' ); ?></p>
    15681568        <div class="welcome-panel-column-container">
    15691569        <div class="welcome-panel-column">
    1570                 <?php if ( current_user_can( 'customize' ) ): ?>
     1570                <?php if ( current_user_can( 'customize' ) ):
     1571                        $customize_themes_link = add_query_arg( 'autofocus[panel]', 'themes', admin_url( 'customize.php' ) ); ?>
    15711572                        <h3><?php _e( 'Get Started' ); ?></h3>
    15721573                        <a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a>
    15731574                <?php endif; ?>
    15741575                <a class="button button-primary button-hero hide-if-customize" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
    15751576                <?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?>
    1576                         <p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p>
     1577                        <p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), $customize_themes_link ); ?></p>
    15771578                <?php endif; ?>
    15781579        </div>
    15791580        <div class="welcome-panel-column">