heartbeat_nopriv_send filter-hookWP 3.6.0

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_ajax_nopriv_heartbeat()
heartbeat_nopriv_send
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 480
add_filter( 'heartbeat_nopriv_send', 'wp_auth_check' );