Opened 12 years ago
Closed 9 years ago
#25299 closed defect (bug) (invalid)
Customizer color picker "clear" button not reset the value to default
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6.1 |
Component: | Customize | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description (last modified by )
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' ) ) );
Attachments (1)
Change History (7)
#5
@
11 years ago
It is appear to me "Clear" button but yes I need this button to reset it to the default, and the default value for my example is null mean "do not use it".
And this my project on github
https://github.com/parmaja/wp_metallic
#6
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
This is an issue caused by custom code, to create a behavior not supported by WordPress core. In this case, the plugin involved needs to implement it's own save method or use it's own colorpicker
Note: See
TracTickets for help on using
tickets.
Related: #21059