[wp-trac] [WordPress Trac] #20542: Extend register_widget to allow passing params as second argument

WordPress Trac noreply at wordpress.org
Tue Apr 29 05:32:15 UTC 2014


#20542: Extend register_widget to allow passing params as second argument
--------------------------+-----------------------------
 Reporter:  codearachnid  |       Owner:  codearachnid
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Widgets       |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by cmmarslender):

 Replying to [comment:6 westonruter]:
 > Re: [attachment:20542.diff], I've seen cases where a plugin expects the
 array keys of `$wp_widget_factory->widgets` to be the actual class names.
 That being said, they could (and perhaps should) be doing `get_class()` on
 the array values, but they'd need to be updated to do so.

 Unless $args is non-empty, the key is the name of the class, so this would
 still work for you average widget -Only time hash is added is if $args has
 a value of some sort

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


More information about the wp-trac mailing list