[wp-trac] [WordPress Trac] #37893: Implementation of is_registered_sidebar() doesn't match its documented signature

WordPress Trac noreply at wordpress.org
Sun Oct 30 23:22:28 UTC 2016


#37893: Implementation of is_registered_sidebar() doesn't match its documented
signature
-------------------------------------+-----------------------
 Reporter:  mdgl                     |       Owner:  welcher
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.7
Component:  Widgets                  |     Version:  4.4
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |     Focuses:  docs
-------------------------------------+-----------------------
Changes (by mdgl):

 * keywords:  needs-patch => needs-patch 2nd-opinion


Comment:

 @welcher you didn't say which patch you applied, nor did you respond to
 the "second opinion" request from @PieWP. There is a conflict of views
 here about how best to resolve this ticket.

 As far as I can see, the failing test function
 `test_unregister_sidebar_with_numeric_id()` assumes sidebars can be
 registered with integer values for `id` but this actually conflicts with
 the documented interface for function `register_sidebar()` which specifies
 a string only.  It also assumes that such sidebars are stored directly in
 global array `$wp_registered_sidebars` but this conflicts with the
 behaviour of function `dynamic_sidebar()` and `is_active_sidebar()` which
 assume an integer `id` is first converted to a string of form
 `sidebar-$id` before indexing the global array.

 Which interface semantics would you like to support?

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


More information about the wp-trac mailing list