[wp-trac] [WordPress Trac] #25299: Customizer color picker "clear" button not reset the value to default

WordPress Trac noreply at wordpress.org
Thu Sep 12 20:38:49 UTC 2013


#25299: Customizer color picker "clear" button not reset the value to default
--------------------------+-----------------------------
 Reporter:  zaherdirkey   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Appearance    |    Version:  3.6.1
 Severity:  normal        |   Keywords:  color picker
--------------------------+-----------------------------
 While useing in customize the theme WP_Customize_Color_Control
 Clear button reset the value but not saved after Save/publish
 Refresh the page to check if it is not saved.

     $wp_customize->add_setting('user_color', array(
         'default'           => null,
         'sanitize_callback' => 'sanitize_hex_color',
         'capability'        => 'edit_theme_options',
         'type'              => 'theme_mod',
         'transport'         => 'postMessage'

     ));

     $wp_customize->add_control(new
 WP_Customize_Color_Control($wp_customize, 'user_color', array(
           'settings' => 'user_color',
           'label'    => __('User Color', 'metallic'),
           'section'  => 'metallic_options'
         )
       )
     );

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25299>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list