From 6467281a2bc37228367239fe29cfec96cba4a187 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 1 Oct 2012 14:58:05 +0000 Subject: [PATCH] Provide no-customize fallback to the welcome screen. Use the customize overlay rather than a page reload. see #21368. git-svn-id: https://develop.svn.wordpress.org/trunk@22089 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/dashboard.php | 5 +++-- wp-admin/index.php | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 2aab210ab8..613fe04b45 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -1240,9 +1240,10 @@ function wp_welcome_panel() {

- + + true ) ) ) > 1 ) ) : ?> -

change your theme completely' ), admin_url( 'themes.php' ) ); ?>

+

change your theme completely' ), admin_url( 'themes.php' ) ); ?>

diff --git a/wp-admin/index.php b/wp-admin/index.php index 8691f34c4d..4047247385 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -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() )