Opened 14 years ago
Last modified 2 years ago
#16443 new feature request
We need a way to programmatically tell if we are in a sidebar
Reported by: | jorbin | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 2.2 |
Component: | Widgets | Keywords: | needs-patch dev-feedback |
Focuses: | Cc: |
Description
There is currently no way to tell if you are in_a_sidebar or doing a widget which makes me a sad stallman lookalike.
Attachments (1)
Change History (11)
#1
@
14 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
#3
@
14 years ago
I'm not sure what you're trying to do, but you might be able to accomplish it by attaching a callback to the 'dynamic_sidebar'
action hook.
#4
@
14 years ago
That doesn't tell him that he's in a sidebar — just that one started. There is no hook that fires when the sidebar is done.
#5
@
14 years ago
I'm not saying we shouldn't add some more action hooks; inside-widgets-sidebars.php
is just for fun to see if it could be done with the current code.
#7
@
10 years ago
- Type changed from enhancement to feature request
Couldn't you do a did_action on dynamic_sidebar_before
to check?
Note: See
TracTickets for help on using
tickets.
Sounds like a reasonable request.