[wp-trac] [WordPress Trac] #32987: Adding filters to allow alternate sidebar storage for registered sidebars

WordPress Trac noreply at wordpress.org
Wed Aug 12 02:10:39 UTC 2015


#32987: Adding filters to allow alternate sidebar storage for registered sidebars
------------------------------------+------------------------------
 Reporter:  welcher                 |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Widgets                 |     Version:  trunk
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Comment (by welcher):

 Replying to [comment:4 westonruter]:
 > @welcher As opposed to introducing new filters, why not just utilize
 `pre_option_sidebars_widgets` filters?

 Currently that would be the best approach, however I like the idea of
 having a hook before the get_option() call happens so we can decouple the
 get/set process completely from the calls to the `*_option` methods. I
 think this provides more flexibility moving forward.

 I also found the storage process with the
 `pre_update_option_sidebars_widgets` filter to be a little counter-
 intuitive as you have to return `$old_value` to short circuit the
 `update_option` call.
 .

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32987#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list