heartbeat_send
Filters the Heartbeat response sent.
Description
Parameters (2)
- 0. $response (array)
- The Heartbeat response.
- 1. $screen_id (string)
- The screen id.
Usage
- To run the hook, copy the example below.
- $response = apply_filters( 'heartbeat_send', $response, $screen_id );
- if ( !empty( $response ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the heartbeat_send callback
- function filter_heartbeat_send( $response, $screen_id ) {
- // make filter magic happen here...
- return $response;
- };
- // add the filter
- add_filter( 'heartbeat_send', 'filter_heartbeat_send', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'heartbeat_send', 'filter_heartbeat_send', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /wp-admin/includes/ajax-actions.php
- $response = apply_filters( 'heartbeat_send', $response, $screen_id );