Make WordPress Core


Ignore:
Timestamp:
11/28/2013 05:23:50 AM (12 years ago)
Author:
helen
Message:

Pass the post type to the post_type_archive_title filter for better context. Adds lovely docs. props DrewAPicture. fixes #25605.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r26147 r26457  
    715715
    716716    $post_type_obj = get_post_type_object( $post_type );
    717     $title = apply_filters('post_type_archive_title', $post_type_obj->labels->name );
     717    /**
     718     * Filter the post type archive title.
     719     *
     720     * @since 3.1.0
     721     *
     722     * @param string $post_type_name Post type 'name' label.
     723     * @param string $post_type      Post type.
     724     */
     725    $title = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name, $post_type );
    718726
    719727    if ( $display )
Note: See TracChangeset for help on using the changeset viewer.