Filter hook 'feed_links_show_comments_feed'

in WP Core File wp-includes/general-template.php at line 3335

View Source

feed_links_show_comments_feed

Filter Hook
Description
Filters the extra feed links arguments.

Hook Information

File Location wp-includes/general-template.php View on GitHub
Hook Type Filter
Line Number 3335

Hook Parameters

Type Name Description
array $args An array of extra feed links arguments.

Usage Examples

Basic Usage
<?php
// Hook into feed_links_show_comments_feed
add_filter('feed_links_show_comments_feed', 'my_custom_filter', 10, 1);

function my_custom_filter($args) {
    // Your custom filtering logic here
    return $args;
}

Source Code Context

wp-includes/general-template.php:3335 - How this hook is used in WordPress core
<?php
3330  	if ( is_singular() ) {
3331  		$id   = 0;
3332  		$post = get_post( $id );
3333  
3334  		/** This filter is documented in wp-includes/general-template.php */
3335  		$show_comments_feed = apply_filters( 'feed_links_show_comments_feed', true );
3336  
3337  		/**
3338  		 * Filters whether to display the post comments feed link.
3339  		 *
3340  		 * This filter allows to enable or disable the feed link for a singular post

PHP Documentation

<?php
/**
	 * Filters the extra feed links arguments.
	 *
	 * @since 6.7.0
	 *
	 * @param array $args An array of extra feed links arguments.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/general-template.php
Related Hooks

Related hooks will be displayed here in future updates.