#50347 closed enhancement (fixed)
is_active_sidebar() documentation is terrible
| Reported by: | SUM1 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.5 |
| Component: | Widgets | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
The DocBlock for is_active_sidebar() in wp-includes/widgets.php is terrible, and I spent several hours wondering why mine returned true constantly, even when the sidebar wasn't loaded on the page.
Updated the documentation accordingly, to specify that it returns true if the sidebar contains widgets.
Attachments (1)
Change History (4)
#1
@
6 years ago
- Component General → Widgets
- Keywords has-patch added
- Milestone Awaiting Review → 5.5
- Version trunk
#3
@
6 years ago
The developer handbook needs to be updated too.
https://developer.wordpress.org/themes/basics/conditional-tags/#is-sidebar-active
Presently, it reads
Check to see if a given sidebar is active (in use). Returns true if the sidebar (identified by name, id, or number) is in use, otherwise the function returns false.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks @SUM1 !