Opened 18 years ago
Closed 16 years ago
#4594 closed enhancement (fixed)
Widgets API to check for active sidebars
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.3 |
Component: | Widgets | Keywords: | has-patch |
Focuses: | Cc: |
Description
There should be a way to check if particular sidebar is in use, because a theme developer might want to change the markup in the presence of a sidebar actually being used.
My patch adds a "is_active_sidebar" function, to which one can pass a sidebar name, id, or number to return a boolean value reflecting whether that sidebar is actually in use.
Attachments (1)
Change History (8)
Note: See
TracTickets for help on using
tickets.
The patch is still good, and the idea, helpful, in my opinion. Having an API to figure out active sidebars is better than forcing theme creators to parse the global widget variables.