xmlrpc_call_success_wp_newComment
Fires after a new comment has been successfully created via XML-RPC.
Usage
add_action( 'xmlrpc_call_success_wp_newComment', 'wp_kama_xmlrpc_call_success_wp_newComment_action', 10, 2 );
/**
* Function for `xmlrpc_call_success_wp_newComment` action-hook.
*
* @param int $comment_id ID of the new comment.
* @param array $args An array of new comment arguments.
*
* @return void
*/
function wp_kama_xmlrpc_call_success_wp_newComment_action( $comment_id, $args ){
// action...
}
- $comment_id(int)
- ID of the new comment.
- $args(array)
- An array of new comment arguments.
Changelog
| Since 3.4.0 | Introduced. |
Where the hook is called
wp-includes/class-wp-xmlrpc-server.php 4046
do_action( 'xmlrpc_call_success_wp_newComment', $comment_id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase