wp-includes/general-template.php:3304Displays the links to the extra feeds such as category feeds.
$argsarrayoptionalarray()9 hooks fire while feed_links_extra() runs, in this order:
Filters the extra feed links arguments.
Filters whether to display the comments feed link.
Filters whether to display the post comments feed link.
Filters whether to display the post type archive feed link.
Filters whether to display the category feed link.
Filters whether to display the tag feed link.
Filters whether to display the custom taxonomy feed link.
Filters whether to display the author feed link.
Filters whether to display the search results feed link.
function feed_links_extra( $args = array() ) { $defaults = array( /* translators: Separator between site name and feed type in feed links. */ 'separator' => _x( '»', 'feed link' ), /* translators: 1: Site name, 2: Separator (raquo), 3: Post title. */ 'singletitle' => __( '%1$s %2$s %3$s Comments Feed' ), /* translators: 1: Site name, 2: Separator (raquo), 3: Category name. */ 'cattitle' => __( '%1$s %2$s %3$s Category Feed' ), /* translators: 1: Site name, 2: Separator (raquo), 3: Tag name. */ 'tagtitle' => __( '%1$s %2$s %3$s Tag Feed' ), /* translators: 1: Site name, 2: Separator (raquo), 3: Term name, 4: Taxonomy singular name. */ 'taxtitle' => __( '%1$s %2$s %3$s %4$s Feed' ), /* translators: 1: Site name, 2: Separator (raquo), 3: Author name. */ 'authortitle' => __( '%1$s %2$s Posts by %3$s Feed' ), /* translators: 1: Site name, 2: Separator (raquo), 3: Search query. */ 'searchtitle' => __( '%1$s %2$s Search Results for “%3$s” Feed' ), /* translators: 1: Site name, 2: Separator (raquo), 3: Post type name. */ 'posttypetitle' => __( '%1$s %2$s %3$s Feed' ), ); $args = wp_parse_args( $args, $defaults ); /** * Filters the extra feed links arguments. * * @since 6.7.0 * * @param array $args An array of extra feed links arguments. */ $args = apply_filters( 'feed_links_extra_args', $args ); /* * The template conditionals are referring to the global query, so the queried object is used rather than * depending on a global $post being set. */ $queried_object = get_queried_object(); if ( is_singular() && $queried_object instanceof WP_Post ) { $post = $queried_object; /** This filter is documented in wp-includes/general-template.php */ $show_comments_feed = apply_filters( 'feed_links_show_comments_feed', true ); /** * Filters whether to display the post comments feed link. * * This filter allows to enable or disable the feed link for a singular post * in a way that is independent of {@see 'feed_links_show_comments_feed'} * (which controls the global comments feed). The result of that filter * is accepted as a parameter. * * @since 6.1.0 * * @param bool $show_comments_feed Whether to display the post comments feed link. Defaults to * the {@see 'feed_links_show_comments_feed'} filter result. */ $show_post_comments_feed = apply_filters( 'feed_links_extra_show_post_comments_feed', $show_comments_feed ); if ( $show_post_comments_feed && ( comments_open( $post ) || pings_open( $post ) || (int) $post->comment_count > 0 ) ) { $title = sprintf( $args['singletitle'], get_bloginfo( 'name' ), $args['separator'], the_title_attribute( array( 'echo' => false, 'post' => $post, ) ) ); $feed_link = get_post_comments_feed_link( $post->ID ); if ( $feed_link ) { $href = $feed_link; } } } elseif ( is_post_type_archive() ) { /** * Filters whether to display the post type archive feed link. *Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/general-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.