From fe9de5f4a4fb0f68e2093ec891ae21d8e9a0d8a7 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 2 Dec 2011 20:48:47 +0000 Subject: [PATCH] Handle themes that have no customization screens. fixes #19408 git-svn-id: http://svn.automattic.com/wordpress/trunk@19545 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/dashboard.php | 52 +++++++++++++++++---------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 05b51cee3..80be66bd8 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -1321,34 +1321,36 @@ function wp_welcome_panel() { echo '

'; printf( __( 'Install a theme to get started customizing your site.' ), esc_url( admin_url( 'themes.php' ) ) ); echo '

'; - else: - echo '

'; - printf( __( 'Use the current theme — %1$s — or choose a new one. If you stick with %3$s, here are a few ways to make your site look unique.' ), $ct->title, esc_url( admin_url( 'themes.php' ) ), $ct->title ); - echo '

'; + else: + $customize_links = array(); + if ( 'twentyeleven' == $ct->stylesheet ) + $customize_links[] = sprintf( __( 'Choose light or dark' ), esc_url( admin_url( 'themes.php?page=theme_options' ) ) ); + + if ( current_theme_supports( 'custom-background' ) ) + $customize_links[] = sprintf( __( 'Set a background color' ), esc_url( admin_url( 'themes.php?page=custom-background' ) ) ); + + if ( current_theme_supports( 'custom-header' ) ) + $customize_links[] = sprintf( __( 'Select a new header image' ), esc_url( admin_url( 'themes.php?page=custom-header' ) ) ); + + if ( current_theme_supports( 'widgets' ) ) + $customize_links[] = sprintf( __( 'Add some widgets' ), esc_url( admin_url( 'widgets.php' ) ) ); + + if ( ! empty( $customize_links ) ) { + echo '

'; + printf( __( 'Use the current theme — %1$s — or choose a new one. If you stick with %3$s, here are a few ways to make your site look unique.' ), $ct->title, esc_url( admin_url( 'themes.php' ) ), $ct->title ); + echo '

'; ?> - '; + printf( __( 'Use the current theme — %1$s — or choose a new one.' ), $ct->title, esc_url( admin_url( 'themes.php' ) ) ); + echo '

'; + } endif; ?>