diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 80d9b1983..1a49f62bd 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -120,7 +120,7 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na ?>
- + <?php esc_attr_e( 'Current theme preview' ); ?> <?php esc_attr_e( 'Current theme preview' ); ?> @@ -141,7 +141,7 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na
- + 'appearance', 'id' => 'customize', 'title' => __('Customize'), - 'href' => wp_customize_url(get_stylesheet()), + 'href' => wp_customize_url(), 'meta' => array( 'class' => 'hide-if-no-customize', ), diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 5485b3ed5..004a5281d 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1615,9 +1615,14 @@ add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' ); * Returns a URL to load the theme customizer. * * @since 3.4.0 + * + * @param string $stylesheet Optional. Theme to customize. Defaults to current theme. */ -function wp_customize_url( $stylesheet ) { - return esc_url( admin_url( 'customize.php' ) . '?theme=' . $stylesheet ); +function wp_customize_url( $stylesheet = null ) { + $url = admin_url( 'customize.php' ); + if ( $stylesheet ) + $url .= '?theme=' . $stylesheet; + return esc_url( $url ); } /**