Action hook 'rss2_head'

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

View Source

rss2_head

Action Hook
Description
Fires at the end of the RSS2 Feed Header.

Hook Information

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

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

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

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

Source Code Context

wp-includes/feed-rss2.php:83 - How this hook is used in WordPress core
<?php
  78  	/**
  79  	 * Fires at the end of the RSS2 Feed Header.
  80  	 *
  81  	 * @since 2.0.0
  82  	 */
  83  	do_action( 'rss2_head' );
  84  
  85  	while ( have_posts() ) :
  86  		the_post();
  87  		?>
  88  	<item>

PHP Documentation

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

Related hooks will be displayed here in future updates.