mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 21:28:02 +01:00
Pass the post type to the post_type_archive_title
filter for better context. Adds lovely docs. props DrewAPicture. fixes #25605.
git-svn-id: https://develop.svn.wordpress.org/trunk@26457 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eaa7c65263
commit
62479c7420
@ -714,7 +714,15 @@ function post_type_archive_title( $prefix = '', $display = true ) {
|
||||
$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 );
|
||||
/**
|
||||
* Filter the post type archive title.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param string $post_type_name Post type 'name' label.
|
||||
* @param string $post_type Post type.
|
||||
*/
|
||||
$title = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name, $post_type );
|
||||
|
||||
if ( $display )
|
||||
echo $prefix . $title;
|
||||
|
Loading…
x
Reference in New Issue
Block a user