[wp-trac] [WordPress Trac] #33602: is_active_sidebar returns true when widget has been deactivated
WordPress Trac
noreply at wordpress.org
Wed Sep 2 02:18:17 UTC 2015
#33602: is_active_sidebar returns true when widget has been deactivated
--------------------------+------------------------------
Reporter: karlikdesign | Owner: welcher
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: 4.3
Severity: normal | Resolution:
Keywords: | Focuses: administration
--------------------------+------------------------------
Changes (by welcher):
* keywords: close 2nd-opinion =>
* owner: => welcher
* status: new => assigned
Comment:
Replying to [comment:2 knutsp]:
> Can `is_active_sidebar()` scan through all the widgets and check is
every registered widget is actually not deactivated?
>
> If not realistic, this a wontfix, even if it may seem unexpected
behaviour. A note could be added to the docs.
It's possible to look at the contents of `$wp_registered_widgets` to see
if the instances stored in `sidebars_widgets` are in there. I was able to
address the issue by using the `is_active_sidebar` filter with this -[
https://gist.github.com/ryanwelcher/64042dc1946f36840b61]
I'll work it into a patch shortly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33602#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list