[wp-trac] [WordPress Trac] #37893: Implementation of is_registered_sidebar() doesn't match its documented signature
WordPress Trac
noreply at wordpress.org
Thu Oct 6 16:44:35 UTC 2016
#37893: Implementation of is_registered_sidebar() doesn't match its documented
signature
-------------------------------------+-------------------
Reporter: mdgl | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Widgets | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: docs
-------------------------------------+-------------------
Comment (by mdgl):
Thanks for the interest, PieWP but I think the original behaviour here
with `is_int()` is actually correct and matches both the inline
documentation and related functions such as `is_active_sidebar()` and
`dynamic_sidebar()`.
With your patch, a call to `register_sidebar(array('id' => "1"))` or
`is_active_sidebar("1")` would refer to a different sidebar than
`unregister_sidebar("1")` which would be rather inconsistent and
confusing. In fact, you would not be able to unregister a sidebar
identified and registered in that way.
Yes, the way WordPress handles sidebar identifiers is all a bit messy, but
fixing it properly would require a much larger patch, changing many more
things and potentially affecting existing themes and plugins. WordPress
prides itself on maintaining backwards compatibility so it is not easy to
"improve" such things without careful thought.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37893#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list