Action hook 'commentsrss2_head'

in WP Core File wp-includes/feed-rss2-comments.php at line 71

View Source

commentsrss2_head

Action Hook
Description
Fires at the end of the RSS2 comment feed header.

Hook Information

File Location wp-includes/feed-rss2-comments.php View on GitHub
Hook Type Action
Line Number 71

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into commentsrss2_head
add_action('commentsrss2_head', 'my_custom_function');

function my_custom_function() {
    // Your custom code here
}

Source Code Context

wp-includes/feed-rss2-comments.php:71 - How this hook is used in WordPress core
<?php
  66  	/**
  67  	 * Fires at the end of the RSS2 comment feed header.
  68  	 *
  69  	 * @since 2.3.0
  70  	 */
  71  	do_action( 'commentsrss2_head' );
  72  
  73  	while ( have_comments() ) :
  74  		the_comment();
  75  		$comment_post = get_post( $comment->comment_post_ID );
  76  		/**

PHP Documentation

<?php
/**
	 * Fires at the end of the RSS2 comment feed header.
	 *
	 * @since 2.3.0
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 0
  • File: wp-includes/feed-rss2-comments.php
Related Hooks

Related hooks will be displayed here in future updates.