xmlrpc_call_success_wp_newComment
Fires after a new comment has been successfully created via XML-RPC.
Использование
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(массив)
- An array of new comment arguments.
Список изменений
С версии 3.4.0 | Введена. |
Где вызывается хук
wp-includes/class-wp-xmlrpc-server.php 4020
do_action( 'xmlrpc_call_success_wp_newComment', $comment_id, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase