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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
192 | if ( $cat ) |
193 | $title = apply_filters('single_cat_title', $cat->name); |
194 | } |
195 |
|
196 | if ( !empty($tag) ) { |
197 | $tag = get_term($tag, 'post_tag', OBJECT, 'display'); |
198 | if ( is_wp_error( $tag ) ) |
199 | return $tag; |
200 | if ( ! empty($tag->name) ) |
201 | $title = apply_filters('single_tag_title', $tag->name); |
202 | } |
203 |
|
204 | // If there's an author |
205 | if ( !empty($author) ) { |
206 | $title = get_userdata($author); |
207 | $title = $title->display_name; |
208 | } |
209 | if ( !empty($author_name) ) { |
210 | // We do a direct query here because we don't cache by nicename. |
Line | Code |
293 | if ( !is_tag() ) |
294 | return; |
295 |
|
296 | $tag_id = intval( get_query_var('tag_id') ); |
297 |
|
298 | if ( !empty($tag_id) ) { |
299 | $my_tag = &get_term($tag_id, 'post_tag', OBJECT, 'display'); |
300 | if ( is_wp_error( $my_tag ) ) |
301 | return false; |
302 | $my_tag_name = apply_filters('single_tag_title', $my_tag->name); |
303 | if ( !empty($my_tag_name) ) { |
304 | if ( $display ) |
305 | echo $prefix . $my_tag_name; |
306 | else |
307 | return $my_tag_name; |
308 | } |
309 | } |
310 | } |
311 |
|