From d62320bff5b3d78285fc021fe5e2f2c9dbb94773 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 29 Oct 2014 02:42:35 +0000 Subject: [PATCH] Correct some logic to populate the `defaultValue` variable when `data.defaultValue` begins with a hash symbol. Props antpb Fixes #30125 git-svn-id: https://develop.svn.wordpress.org/trunk@30087 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-control.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/class-wp-customize-control.php b/src/wp-includes/class-wp-customize-control.php index cbb7cdde5d..a790b71115 100644 --- a/src/wp-includes/class-wp-customize-control.php +++ b/src/wp-includes/class-wp-customize-control.php @@ -554,6 +554,8 @@ class WP_Customize_Color_Control extends WP_Customize_Control { if ( data.defaultValue ) { if ( '#' !== data.defaultValue.substring( 0, 1 ) ) { defaultValue = '#' + data.defaultValue; + } else { + defaultValue = data.defaultValue; } defaultValue = ' data-default-color=' + defaultValue; // Quotes added automatically. } #>