Opened 4 years ago
Closed 4 years ago
#10573 closed enhancement (fixed)
Pass $instance to the "widget_text" filter
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9 |
| Component: | Widgets | Version: | 2.9 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
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)
Viper007Bond — 4 years ago
comment:1
Viper007Bond — 4 years ago
- Type changed from defect (bug) to enhancement
comment:2
Viper007Bond — 4 years ago
- Milestone changed from Unassigned to 2.9
- Version set to 2.9
Note: See
TracTickets for help on using
tickets.

(In [11792]) Pass the widget instance as context to the widget_title and widget_text filters. Fixes #10573 props Viper007Bond.