Make WordPress Core

Changeset 22089


Ignore:
Timestamp:
10/01/2012 02:58:05 PM (12 years ago)
Author:
nacin
Message:

Provide no-customize fallback to the welcome screen. Use the customize overlay rather than a page reload. see #21368.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r22019 r22089  
    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 load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a>
     1244        <a class="button-primary welcome-button hide-if-customize" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
    12441245        <?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>
     1246            <p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p>
    12461247        <?php endif; ?>
    12471248    </div>
  • trunk/wp-admin/index.php

    r22018 r22089  
    1818
    1919wp_enqueue_script( 'dashboard' );
    20 wp_enqueue_script( 'plugin-install' );
    21 wp_enqueue_script( 'media-upload' );
     20if ( current_user_can( 'edit_theme_options' ) )
     21    wp_enqueue_script( 'customize-loader' );
     22if ( current_user_can( 'install_plugins' ) )
     23    wp_enqueue_script( 'plugin-install' );
     24if ( current_user_can( 'upload_files' ) )
     25    wp_enqueue_script( 'media-upload' );
    2226add_thickbox();
    2327
Note: See TracChangeset for help on using the changeset viewer.