commentrss2_item

Fires at the end of each RSS2 comment feed item.

Description

do_action( 'commentrss2_item', (int) $comment_comment_id, (int) $comment_post_id ); 

Parameters (2)

0. $comment_comment_id (int)
The ID of the comment being displayed.
1. $comment_post_id (int)
The ID of the post the comment is connected to.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'commentrss2_item', $comment_comment_id, $comment_post_id ); 
The following example is for adding a hook callback.
  1. // define the commentrss2_item callback 
  2. function action_commentrss2_item( $comment_comment_id, $comment_post_id ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'commentrss2_item', 'action_commentrss2_item', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'commentrss2_item', 'action_commentrss2_item', 10, 2 ); 

Defined (1)

The action is defined in the following location(s).

/wp-includes/feed-rss2-comments.php  
  1. do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID );