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
46           /**
47            * Filter the widget title.
48            *
49            * @since 2.6.0
50            *
51            * @param string $title    The widget title. Default 'Pages'.
52            * @param array  $instance An array of the widget's settings.
53            * @param mixed  $id_base  The widget ID.
54            */
55           $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title'], $instance, $this->id_base );
56
57           $sortby = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby'];
58           $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude'];
59
60           if ( $sortby == 'menu_order' )
61                $sortby = 'menu_order, post_title';
62
63           /**
64            * Filter the arguments for the Pages widget.