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

git-svn-id: http://core.svn.wordpress.org/trunk@22089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-10-01 14:58:05 +00:00
parent b1834eae16
commit b0e29340e1
2 changed files with 9 additions and 4 deletions

View File

@ -1240,9 +1240,10 @@ function wp_welcome_panel() {
<div class="welcome-panel-column">
<h4><?php _e( 'Get Started' ); ?></h4>
<p><?php _e( 'First, tweak the look of your site:' ); ?></p>
<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>
<a class="button-primary welcome-button load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a>
<a class="button-primary welcome-button hide-if-customize" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
<?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?>
<p><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p>
<p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p>
<?php endif; ?>
</div>
<div class="welcome-panel-column">

View File

@ -17,8 +17,12 @@ require_once(ABSPATH . 'wp-admin/includes/dashboard.php');
wp_dashboard_setup();
wp_enqueue_script( 'dashboard' );
wp_enqueue_script( 'plugin-install' );
wp_enqueue_script( 'media-upload' );
if ( current_user_can( 'edit_theme_options' ) )
wp_enqueue_script( 'customize-loader' );
if ( current_user_can( 'install_plugins' ) )
wp_enqueue_script( 'plugin-install' );
if ( current_user_can( 'upload_files' ) )
wp_enqueue_script( 'media-upload' );
add_thickbox();
if ( wp_is_mobile() )