heartbeat_nopriv_send
Filters Heartbeat Ajax response in no-privilege environments when no data is passed.
Usage
add_filter( 'heartbeat_nopriv_send', 'wp_kama_heartbeat_nopriv_send_filter', 10, 2 );
/**
* Function for `heartbeat_nopriv_send` filter-hook.
*
* @param array $response The no-priv Heartbeat response.
* @param string $screen_id The screen ID.
*
* @return array
*/
function wp_kama_heartbeat_nopriv_send_filter( $response, $screen_id ){
// filter...
return $response;
}
- $response(array)
- The no-priv Heartbeat response.
- $screen_id(string)
- The screen ID.
Changelog
| Since 3.6.0 | Introduced. |
Where the hook is called
wp-admin/includes/ajax-actions.php 54
$response = apply_filters( 'heartbeat_nopriv_send', $response, $screen_id );
Where the hook is used in WordPress
wp-includes/default-filters.php 500
add_filter( 'heartbeat_nopriv_send', 'wp_auth_check' );