関数 post_type_archive_title()
2014/12/25
関数 post_type_archive_title()
定義ファイル :/blog/wp-includes/general-template.php 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function post_type_archive_title( $prefix = '', $display = true ) { if ( ! is_post_type_archive() ) return; $post_type = get_query_var( 'post_type' ); if ( is_array( $post_type ) ) $post_type = reset( $post_type ); $post_type_obj = get_post_type_object( $post_type ); $title = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name, $post_type ); if ( $display ) echo $prefix . $title; else return $prefix . $title; } |