[wp-trac] [WordPress Trac] #36389: Selective refresh for widgets gets lost once `refresh` is used

WordPress Trac noreply at wordpress.org
Sat Apr 2 04:12:37 UTC 2016


#36389: Selective refresh for widgets gets lost once `refresh` is used
--------------------------+--------------------------
 Reporter:  scamartist26  |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  4.5
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+--------------------------

Comment (by westonruter):

 OK, I think the issue is this: when you edit a widget, it will be included
 among the `customized` state and will be seen when accessing
 `WP_Customize_Manager::unsanitized_post_values()`. The
 `WP_Customize_Widgets::register_settings()` method is called at
 `after_setup_theme` and it ensures that any widgets in the `customized`
 state are registered up front. The
 `WP_Customize_Widgets::get_selective_refreshable_widgets()` method is
 getting called before the `widgets_init` is triggered, and because of this
 none of the widgets have been registered and so an empty array gets
 cached.

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


More information about the wp-trac mailing list