[wp-trac] [WordPress Trac] #30236: Trigger widget-added event in Customizer when initializing

WordPress Trac noreply at wordpress.org
Mon Nov 3 23:07:47 UTC 2014


#30236: Trigger widget-added event in Customizer when initializing
--------------------------+-------------------------
 Reporter:  westonruter   |       Owner:  ocean90
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  4.1
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+-------------------------

Comment (by ocean90):

 Replying to [comment:3 westonruter]:
 > To test, don't you mean to place your snippet in the root of the script
 so it doesn't get called multiple times?

 You're right, my mistake.

 But adding a new widget triggers `widget-added` now twice for me:
 `api.Widgets.WidgetControl.ready()` and
 `api.Widgets.SidebarControl.addWidget()`.

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


More information about the wp-trac mailing list