heartbeat_received filter-hookWP 3.6.0

Filters the Heartbeat response received.

Usage

add_filter( 'heartbeat_received', 'wp_kama_heartbeat_received_filter', 10, 3 );

/**
 * Function for `heartbeat_received` filter-hook.
 * 
 * @param array  $response  The Heartbeat response.
 * @param array  $data      The $_POST data sent.
 * @param string $screen_id The screen ID.
 *
 * @return array
 */
function wp_kama_heartbeat_received_filter( $response, $data, $screen_id ){

	// filter...
	return $response;
}
$response(array)
The Heartbeat response.
$data(array)
The $_POST data sent.
$screen_id(string)
The screen ID.

Changelog

Since 3.6.0 Introduced.

Where the hook is called

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

Where the hook is used in WordPress

wp-admin/includes/admin-filters.php 78
add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 );
wp-admin/includes/admin-filters.php 79
add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 );
wp-admin/includes/admin-filters.php 80
add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );
wp-includes/class-wp-customize-manager.php 382
add_filter( 'heartbeat_received', array( $this, 'check_changeset_lock_with_heartbeat' ), 10, 3 );