Make WordPress Core

Ticket #23677: 23677-taxonomy.diff

File 23677-taxonomy.diff, 1.3 KB (added by mdgl, 12 years ago)

Suggested patch to add autodiscovery of feeds for custom taxonomy archives.

  • wp-includes/general-template.php

     
    16181618                'cattitle'    => __('%1$s %2$s %3$s Category Feed'),
    16191619                /* translators: 1: blog name, 2: separator(raquo), 3: tag name */
    16201620                'tagtitle'    => __('%1$s %2$s %3$s Tag Feed'),
     1621                /* translators: 1: blog name, 2: separator(raquo), 3: term name, 4: taxonomy singular name */
     1622                'taxtitle'    => __('%1$s %2$s %3$s %4$s Feed'),
    16211623                /* translators: 1: blog name, 2: separator(raquo), 3: author name  */
    16221624                'authortitle' => __('%1$s %2$s Posts by %3$s Feed'),
    16231625                /* translators: 1: blog name, 2: separator(raquo), 3: search phrase */
     
    16461648
    16471649                $title = sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $term->name );
    16481650                $href = get_tag_feed_link( $term->term_id );
     1651        } elseif ( is_tax() ) {
     1652                $term = get_queried_object();
     1653                $tax = get_taxonomy( $term->taxonomy );
     1654                $title = sprintf( $args['taxtitle'], get_bloginfo('name'), $args['separator'], $term->name, $tax->labels->singular_name );
     1655                $href = get_term_feed_link( $term->term_id, $term->taxonomy );
    16491656        } elseif ( is_author() ) {
    16501657                $author_id = intval( get_query_var('author') );
    16511658