Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/widget text

Applied to the widget text of the WordPress Text widgets. May also apply to some third party widgets as well.this filter hook can be used to replace any text within sidebar widgets

Here's an example usage

function exam_plug_text_replace($text) {
 $search = array('welcome admin','today_data');
 $replace = array('welcome adam','9/15/2013');
 $text = str_replace($search, $replace, $text);
 return $text;
add_filter('widget_text', 'exam_plug_text_replace');