[wp-trac] [WordPress Trac] #26817: WP_Customize_Setting default value set to empty string by default
WordPress Trac
noreply at wordpress.org
Sun Feb 2 23:30:57 UTC 2014
#26817: WP_Customize_Setting default value set to empty string by default
-------------------------+------------------------------
Reporter: bassjobsen | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Appearance | Version: 3.8
Severity: normal | Resolution: invalid
Keywords: | Focuses:
-------------------------+------------------------------
Changes (by bassjobsen):
* status: new => closed
* resolution: => invalid
Comment:
Replying to [comment:2 obenland]:
> In your example the default value in the Customizer should be `green`,
rather than an empty string or false.
>
> In cases where the theme mod is not set, `get_theme_mod()` would fall
back to `green` passed as a second argument, in all other cases it would
be set by the default value in the Customizer.
Okay, thanks. I think it makes sense. So in add_setting() the second
paramter $args is required and has a required key (default).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26817#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list