[wp-trac] [WordPress Trac] #48747: WP_Customize_Setting doesn't clean up after itself

WordPress Trac noreply at wordpress.org
Fri Nov 22 02:38:13 UTC 2019


#48747: WP_Customize_Setting doesn't clean up after itself
-------------------------------------------------+-------------------------
 Reporter:  jon81                                |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Customize                            |     Version:  3.4
 Severity:  minor                                |  Resolution:
 Keywords:  dev-feedback has-patch reporter-     |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------
Changes (by dlh):

 * keywords:  reporter-feedback => dev-feedback has-patch reporter-feedback


Comment:

 I can understand why that would be frustrating, for sure. Thinking about
 it more, though, I wonder whether the current behavior is preferable given
 that an instance of `WP_Customize_Setting` can be associated with more
 than one instance of `WP_Customize_Manager` (see #40527.) Same goes for
 controls, sections, and panels. So, I'm not sure that removing a setting
 from one instance of a manager necessarily means the setting should be
 torn down.

 I threw together [attachment:"48747.diff"] as a possible change to provide
 a workaround: Returning the removed construct to the developer for further
 processing, such as removing hooks. I'm not sure I'm sold on it, though.
 It's harmless enough, but would it have been all that useful in your case,
 @jon81?

 Perhaps instead we should call this `maybelater`.

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


More information about the wp-trac mailing list