WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 598 | $widget_args = array( 'number' => $widget_args ); |
| 599 | $widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) ); |
| 600 | extract( $widget_args, EXTR_SKIP ); |
| 601 | |
| 602 | $options = get_option('widget_text'); |
| 603 | if ( !isset($options[$number]) ) |
| 604 | return; |
| 605 | |
| 606 | $title = apply_filters('widget_title', $options[$number]['title']); |
| 607 | $text = apply_filters( 'widget_text', $options[$number]['text'] ); |
| 608 | ?> |
| 609 | <?php echo $before_widget; ?> |
| 610 | <?php if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?> |
| 611 | <div class="textwidget"><?php echo $text; ?></div> |
| 612 | <?php echo $after_widget; ?> |
| 613 | <?php |
| 614 | } |
| 615 | |
| 616 | function wp_widget_text_control($widget_args) { |