Opened 17 years ago
Closed 17 years ago
#10573 closed enhancement (fixed)
Pass $instance to the "widget_text" filter
| Reported by: | Viper007Bond | Owned by: | azaozz |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9 |
| Component: | Widgets | Version: | 2.9 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
I'm trying to conditionally change the content of the text widget. I'm storing whether I need to modify the content or not in the widget's settings by using the widget_update_callback filter and adding a key to the array. However I cannot access the reset of the widget's settings (where my new key is) from within the widget_text filter.
Attached patch passes $instance to the widget_title and widget_text filters for increased flexibility.
Attachments (1)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [11792]) Pass the widget instance as context to the widget_title and widget_text filters. Fixes #10573 props Viper007Bond.