comment_unapproved_trackback
Fires when the status of a specific comment type is in transition.
The dynamic portions of the hook name, $new_status, and $comment->comment_type, refer to the new comment status, and the type of comment, respectively.
Typical comment types include 'comment', 'pingback', or 'trackback'.
Это один из вариантов динамического хука comment_(new_status)_(comment_type)
Использование
add_action( 'comment_unapproved_trackback', 'wp_kama_comment_unapproved_trackback_action', 10, 2 );
/**
* Function for `comment_unapproved_trackback` action-hook.
*
* @param string $comment_id The comment ID as a numeric string.
* @param WP_Comment $comment Comment object.
*
* @return void
*/
function wp_kama_comment_unapproved_trackback_action( $comment_id, $comment ){
// action...
}
- $comment_id(строка)
- The comment ID as a numeric string.
- $comment(WP_Comment)
- Comment object.
Список изменений
| С версии 2.7.0 | Введена. |
Где вызывается хук
comment_unapproved_trackback
wp-includes/comment.php 1896
do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );