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 |
|---|---|
| 568 | $widget_args = array( 'number' => $widget_args ); |
| 569 | $widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) ); |
| 570 | extract( $widget_args, EXTR_SKIP ); |
| 571 | |
| 572 | $options = get_option('widget_text'); |
| 573 | if ( !isset($options[$number]) ) |
| 574 | return; |
| 575 | |
| 576 | $title = $options[$number]['title']; |
| 577 | $text = apply_filters( 'widget_text', $options[$number]['text'] ); |
| 578 | ?> |
| 579 | <?php echo $before_widget; ?> |
| 580 | <?php if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?> |
| 581 | <div class="textwidget"><?php echo $text; ?></div> |
| 582 | <?php echo $after_widget; ?> |
| 583 | <?php |
| 584 | } |
| 585 | |
| 586 | function wp_widget_text_control($widget_args) { |