Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#10573 closed enhancement (fixed)

Pass $instance to the "widget_text" filter

Reported by: Viper007Bond Owned by: azaozz
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.9
Component: Widgets Keywords: has-patch
Focuses: Cc:


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)

10573.patch (833 bytes) - added by Viper007Bond 12 years ago.

Download all attachments as: .zip

Change History (4)

12 years ago

#1 @Viper007Bond
12 years ago

  • Type changed from defect (bug) to enhancement

#2 @Viper007Bond
12 years ago

  • Milestone changed from Unassigned to 2.9
  • Version set to 2.9

#3 @westi
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.