WordPress.org

Make WordPress Core

Ticket #23692: 23963.diff

File 23963.diff, 1.5 KB (added by wonderboymusic, 4 years ago)
  • src/wp-includes/general-template.php

     
    23042304                'comstitle'     => __('%1$s %2$s Comments Feed'),
    23052305        );
    23062306
    2307         $args = wp_parse_args( $args, $defaults );
     2307        $params = wp_parse_args( $args, $defaults );
    23082308
    2309         echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( $args['feedtitle'], get_bloginfo('name'), $args['separator'] ) ) . '" href="' . esc_url( get_feed_link() ) . "\" />\n";
    2310         echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( $args['comstitle'], get_bloginfo('name'), $args['separator'] ) ) . '" href="' . esc_url( get_feed_link( 'comments_' . get_default_feed() ) ) . "\" />\n";
     2309        $feed_and_coms = apply_filters( 'feed_links_types', array( 'posts', 'comments' ) );
     2310
     2311        if ( in_array( 'posts', $feed_and_coms ) ) {
     2312                echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( $params['feedtitle'], get_bloginfo( 'name' ), $params['separator'] ) ) . '" href="' . get_feed_link() . "\" />\n";
     2313        }
     2314
     2315        if ( in_array( 'comments', $feed_and_coms ) ) {
     2316                echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( $params['comstitle'], get_bloginfo( 'name' ), $params['separator'] ) ) . '" href="' . get_feed_link( 'comments_' . get_default_feed() ) . "\" />\n";
     2317        }
    23112318}
    23122319
    23132320/**