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 |
---|---|
547 | if ( $cat ) |
548 | $title = apply_filters('single_cat_title', $cat->name); |
549 | } |
550 |
|
551 | if ( !empty($tag) ) { |
552 | $tag = get_term($tag, 'post_tag', OBJECT, 'display'); |
553 | if ( is_wp_error( $tag ) ) |
554 | return $tag; |
555 | if ( ! empty($tag->name) ) |
556 | $title = apply_filters('single_tag_title', $tag->name); |
557 | } |
558 |
|
559 | // If there's an author |
560 | if ( !empty($author) ) { |
561 | $title = get_userdata($author); |
562 | $title = $title->display_name; |
563 | } |
564 | if ( !empty($author_name) ) { |
565 | // We do a direct query here because we don't cache by nicename. |
Line | Code |
724 | global $wp_query; |
725 | if ( !is_tag() ) |
726 | return; |
727 |
|
728 | $tag = $wp_query->get_queried_object(); |
729 |
|
730 | if ( ! $tag ) |
731 | return; |
732 |
|
733 | $my_tag_name = apply_filters('single_tag_title', $tag->name); |
734 | if ( !empty($my_tag_name) ) { |
735 | if ( $display ) |
736 | echo $prefix . $my_tag_name; |
737 | else |
738 | return $my_tag_name; |
739 | } |
740 | } |
741 |
|
742 | /** |