comment_approved_trackback хук-событиеWP 2.7.0

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_approved_trackback', 'wp_kama_comment_approved_trackback_action', 10, 2 );

/**
 * Function for `comment_approved_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_approved_trackback_action( $comment_ID, $comment ){

	// action...
}
$comment_ID(строка)
The comment ID as a numeric string.
$comment(WP_Comment)
Comment object.

Список изменений

С версии 2.7.0 Введена.

Где вызывается хук

wp_transition_comment_status()
comment_approved_trackback
wp-includes/comment.php 1843
do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );

Где используется хук в WordPress

Использование не найдено.