Make WordPress Core

Ticket #21648: 21648.diff

File 21648.diff, 1020 bytes (added by mdgl, 13 years ago)

Suggested patch, although we could argue about the content of the title itself (eg. should it include "Post Type") and I'm not completely sure whether the use of get_post_type() here is correct.

  • general-template.php

    old new  
    16331633                'authortitle' => __('%1$s %2$s Posts by %3$s Feed'),
    16341634                /* translators: 1: blog name, 2: separator(raquo), 3: search phrase */
    16351635                'searchtitle' => __('%1$s %2$s Search Results for “%3$s” Feed'),
     1636                /* translators: 1: blog name, 2: separator(raquo), 3: post type name */
     1637                'posttypetitle' => __('%1$s %2$s %3$s Post Type Feed'),
    16361638        );
    16371639
    16381640        $args = wp_parse_args( $args, $defaults );
     
    16631665        } elseif ( is_search() ) {
    16641666                $title = sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( false ) );
    16651667                $href = get_search_feed_link();
     1668        } elseif ( is_post_type_archive() ) {
     1669                $title = sprintf( $args['posttypetitle'], get_bloginfo('name'), $args['separator'], post_type_archive_title( '', false ) );
     1670                $href = get_post_type_archive_feed_link( get_post_type() );
    16661671        }
    16671672
    16681673        if ( isset($title) && isset($href) )