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 |
---|---|
708 | function post_type_archive_title( $prefix = '', $display = true ) { |
709 | if ( ! is_post_type_archive() ) |
710 | return; |
711 |
|
712 | $post_type = get_query_var( 'post_type' ); |
713 | if ( is_array( $post_type ) ) |
714 | $post_type = reset( $post_type ); |
715 |
|
716 | $post_type_obj = get_post_type_object( $post_type ); |
717 | $title = apply_filters('post_type_archive_title', $post_type_obj->labels->name ); |
718 |
|
719 | if ( $display ) |
720 | echo $prefix . $title; |
721 | else |
722 | return $prefix . $title; |
723 | } |
724 |
|
725 | /** |
726 | * Display or retrieve page title for category archive. |