diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index edccff2807..f09c54ee96 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -3153,9 +3153,16 @@ function feed_links_extra( $args = array() ) { $id = 0; $post = get_post( $id ); - if ( comments_open() || pings_open() || $post->comment_count > 0 ) { - $title = sprintf( $args['singletitle'], get_bloginfo( 'name' ), $args['separator'], the_title_attribute( array( 'echo' => false ) ) ); - $href = get_post_comments_feed_link( $post->ID ); + /** This filter is documented in wp-includes/general-template.php */ + $show_comments_feed = apply_filters( 'feed_links_show_comments_feed', true ); + + if ( $show_comments_feed && ( comments_open() || pings_open() || $post->comment_count > 0 ) ) { + $title = sprintf( $args['singletitle'], get_bloginfo( 'name' ), $args['separator'], the_title_attribute( array( 'echo' => false ) ) ); + $feed_link = get_post_comments_feed_link( $post->ID ); + + if ( $feed_link ) { + $href = $feed_link; + } } } elseif ( is_post_type_archive() ) { $post_type = get_query_var( 'post_type' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 52c3fa9342..3bc6da94e0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53124'; +$wp_version = '6.0-alpha-53125'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.