WordPress.org

Make WordPress Core

Ticket #21648: 21648-refresh.diff

File 21648-refresh.diff, 1.2 KB (added by wonderboymusic, 6 years ago)
  • wp-includes/general-template.php

     
    16311631                'authortitle' => __('%1$s %2$s Posts by %3$s Feed'),
    16321632                /* translators: 1: blog name, 2: separator(raquo), 3: search phrase */
    16331633                'searchtitle' => __('%1$s %2$s Search Results for “%3$s” Feed'),
     1634                /* translators: 1: blog name, 2: separator(raquo), 3: post type name */
     1635                'posttypetitle' => __('%1$s %2$s %3$s Feed'),           
    16341636        );
    16351637
    16361638        $args = wp_parse_args( $args, $defaults );
     
    16611663        } elseif ( is_search() ) {
    16621664                $title = sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( false ) );
    16631665                $href = get_search_feed_link();
    1664         }
     1666        } elseif ( is_post_type_archive() ) {
     1667                $title = sprintf( $args['posttypetitle'], get_bloginfo('name'), $args['separator'], post_type_archive_title( '', false ) );
     1668                $href = get_post_type_archive_feed_link( get_post_type() );
     1669        }
    16651670
    16661671        if ( isset($title) && isset($href) )
    16671672                echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $title ) . '" href="' . esc_url( $href ) . '" />' . "\n";