Filter hook 'heartbeat_received'

in WP Core File wp-admin/includes/ajax-actions.php at line 3503

View Source

heartbeat_received

Filter Hook
Description
Filters the Heartbeat response received.

Hook Information

File Location wp-admin/includes/ajax-actions.php View on GitHub
Hook Type Filter
Line Number 3503

Hook Parameters

Type Name Description
array $response The Heartbeat response.
array $data The $_POST data sent.
string $screen_id The screen ID.

Usage Examples

Basic Usage
<?php
// Hook into heartbeat_received
add_filter('heartbeat_received', 'my_custom_filter', 10, 3);

function my_custom_filter($response, $data, $screen_id) {
    // Your custom filtering logic here
    return $response;
}

Source Code Context

wp-admin/includes/ajax-actions.php:3503 - How this hook is used in WordPress core
<?php
3498  		 *
3499  		 * @param array  $response  The Heartbeat response.
3500  		 * @param array  $data      The $_POST data sent.
3501  		 * @param string $screen_id The screen ID.
3502  		 */
3503  		$response = apply_filters( 'heartbeat_received', $response, $data, $screen_id );
3504  	}
3505  
3506  	/**
3507  	 * Filters the Heartbeat response sent.
3508  	 *

PHP Documentation

<?php
/**
		 * Filters the Heartbeat response received.
		 *
		 * @since 3.6.0
		 *
		 * @param array  $response  The Heartbeat response.
		 * @param array  $data      The $_POST data sent.
		 * @param string $screen_id The screen ID.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-admin/includes/ajax-actions.php
Related Hooks

Related hooks will be displayed here in future updates.