[wp-trac] [WordPress Trac] #33499: Allow `$autoload` to be set in `WP_Customize_Setting::_update_option()`
WordPress Trac
noreply at wordpress.org
Fri Aug 21 22:31:08 UTC 2015
#33499: Allow `$autoload` to be set in `WP_Customize_Setting::_update_option()`
-------------------------+------------------
Reporter: dlh | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.4
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------
Comment (by westonruter):
@dlh That's a good point. You're right that these would conflict, or
rather whichever setting is saved first would be the one that would
determine whether it was autoloaded. Nevertheless, I do agree this is an
unlikely scenario. But, at the same time, all of this can be avoided if
the plugin, upon activation, just calls:
{{{add_option( 'foo', '', '', 'no' );}}}
This will ensure that subsequent `update_option()` calls won't result in
the option getting autoloaded.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33499#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list