WordPress.org

Make WordPress Core

Ticket #23692: 23692.3.diff

File 23692.3.diff, 1.7 KB (added by SergeyBiryukov, 4 years ago)
  • src/wp-includes/general-template.php

     
    23062306
    23072307        $args = 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        /**
     2310         * Filter whether to display the posts feed link.
     2311         *
     2312         * @since 4.3.0
     2313         *
     2314         * @param bool $show Whether to display the posts feed link. Default true.
     2315         */
     2316        if ( apply_filters( 'feed_links_show_posts_feed', true ) ) {
     2317                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";
     2318        }
     2319
     2320        /**
     2321         * Filter whether to display the comments feed link.
     2322         *
     2323         * @since 4.3.0
     2324         *
     2325         * @param bool $show Whether to display the comments feed link. Default true.
     2326         */
     2327        if ( apply_filters( 'feed_links_show_comments_feed', true ) ) {
     2328                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";
     2329        }
    23112330}
    23122331
    23132332/**