Opened 2 years ago
Last modified 14 months ago
#16443 new enhancement
We need a way to programmatically tell if we are in a sidebar
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Widgets | Version: | 2.2 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | mikeschinkel@…, dreamwhisper |
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 (7)
comment:1
scribu
— 2 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
comment:2
mikeschinkel
— 2 years ago
- Cc mikeschinkel@… added
comment:3
filosofo
— 2 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.
comment:4
markjaquith
— 2 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.
comment:5
filosofo
— 2 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.
comment:6
dreamwhisper
— 14 months ago
- Cc dreamwhisper added
Sounds like a reasonable request.