heartbeat_send хук-фильтрWP 3.6.0

Filters the Heartbeat response sent.

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

add_filter( 'heartbeat_send', 'wp_kama_heartbeat_send_filter', 10, 2 );

/**
 * Function for `heartbeat_send` filter-hook.
 * 
 * @param array  $response  The Heartbeat response.
 * @param string $screen_id The screen ID.
 *
 * @return array
 */
function wp_kama_heartbeat_send_filter( $response, $screen_id ){

	// filter...
	return $response;
}
$response(массив)
The Heartbeat response.
$screen_id(строка)
The screen ID.

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

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

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

wp_ajax_heartbeat()
heartbeat_send
wp-admin/includes/ajax-actions.php 3510
$response = apply_filters( 'heartbeat_send', $response, $screen_id );

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

wp-includes/default-filters.php 479
add_filter( 'heartbeat_send', 'wp_auth_check' );