How to process content in a widget? [duplicate]

The filter you’re looking for is widget_text. From the Codex:

widget_text
applied to the widget text of the WordPress Text widget. May also apply to some third party widgets as well.

Leave a Comment