[wp-trac] [WordPress Trac] #28216: Allow to register pre-instantiated widgets

WordPress Trac noreply at wordpress.org
Wed Jun 3 12:57:45 UTC 2015


#28216: Allow to register pre-instantiated widgets
-------------------------------+------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Widgets            |     Version:  3.9.1
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by mdwheele):

 I've added two possible implementations that vary on whether branching or
 exiting-early is preferred in the widget factory register and unregister
 methods. This includes a test that has been tagged with this ticket
 number. Tests are passing. The third patch updates the `register_widget`
 and `unregister_widget` functions to reflect the change in argument type
 expectation.

 I apologize in advance if this oversteps standards for contribution! I
 wanted to make sure I packaged this up before moving on to other tasks.
 Please let me know if there's anything you'd like changed!

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


More information about the wp-trac mailing list