[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 21:09:14 UTC 2015


#33499: Allow `$autoload` to be set in `WP_Customize_Setting::_update_option()`
-------------------------+-----------------------------
 Reporter:  dlh          |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Customize    |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 `WP_Customize_Setting::_update_option()` calls `update_option()` for us,
 but it doesn't currently provide a way to use the `$autoload` parameter
 that was added to `update_option()` in 4.2. So, it seems tricky to avoid
 autoloading options that are managed exclusively through the Customizer.

 I'm not sure whether a Customizer-specific filter would be the best way to
 change this behavior, but the attached patch would add one in
 `WP_Customize_Setting::_update_option()`.

 Adding a property to `WP_Customize_Setting` didn't seem like the right
 choice because multiple settings can affect the same option. But an
 alternative approach might be something that can be used in any
 `add_option()` or `update_option()` call.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33499>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list