Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: widget_title

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
39       * @since 2.8.0
40       * @access public
41       *
42       * @param array $args     Display arguments including 'before_title', 'after_title',
43       *                        'before_widget', and 'after_widget'.
44       * @param array $instance Settings for the current Meta widget instance.
45       */
46      public function widget( $args, $instance ) {
47           /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
48           $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Meta' ) : $instance['title'], $instance, $this->id_base );
49
50           echo $args['before_widget'];
51           if ( $title ) {
52                echo $args['before_title'] . $title . $args['after_title'];
53           }
54                ?>
55                <ul>
56                <?php wp_register(); ?>
57                <li><?php wp_loginout(); ?></li>