wp_update_comment_count хук-событиеWP 2.3.0

Fires immediately after a post's comment count is updated in the database.

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

add_action( 'wp_update_comment_count', 'wp_kama_update_comment_count_action', 10, 3 );

/**
 * Function for `wp_update_comment_count` action-hook.
 * 
 * @param int $post_id Post ID.
 * @param int $new     The new comment count.
 * @param int $old     The old comment count.
 *
 * @return void
 */
function wp_kama_update_comment_count_action( $post_id, $new, $old ){

	// action...
}
$post_id(int)
Post ID.
$new(int)
The new comment count.
$old(int)
The old comment count.

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

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

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

wp_update_comment_count_now()
wp_update_comment_count
wp-includes/comment.php 2767
do_action( 'wp_update_comment_count', $post_id, $new, $old );

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

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