[wp-trac] [WordPress Trac] #33442: Widgets not displayed if no $instance data is set

WordPress Trac noreply at wordpress.org
Thu Aug 20 20:54:38 UTC 2015


#33442: Widgets not displayed if no $instance data is set
--------------------------+--------------------
 Reporter:  johnnyb       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.3.1
Component:  Widgets       |     Version:  4.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+--------------------

Comment (by GregRoss):

 @westonruter why limit it to arrays?  The old code was type agnostic,
 false or *any* type of data worked.  If the plugin author wanted to store
 the config in an object or a string, that was fine.

 Simply reverting to array_key_exists() and then updating the inline docs
 to reflect the fact that *any* data type (including no data, aka null) may
 be returned from the update() callback and be passed in to the filter.

 After all null could be a valid configuration set for a widget (aka use
 defaults).

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


More information about the wp-trac mailing list