Filter hook 'heartbeat_nopriv_send'

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

View Source

heartbeat_nopriv_send

Filter Hook
Description
Filters Heartbeat Ajax response in no-privilege environments when no data is passed.

Hook Information

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

Hook Parameters

Type Name Description
array $response The no-priv Heartbeat response.
string $screen_id The screen ID.

Usage Examples

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

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

Source Code Context

wp-admin/includes/ajax-actions.php:54 - How this hook is used in WordPress core
<?php
  49  	 * @since 3.6.0
  50  	 *
  51  	 * @param array  $response  The no-priv Heartbeat response.
  52  	 * @param string $screen_id The screen ID.
  53  	 */
  54  	$response = apply_filters( 'heartbeat_nopriv_send', $response, $screen_id );
  55  
  56  	/**
  57  	 * Fires when Heartbeat ticks in no-privilege environments.
  58  	 *
  59  	 * Allows the transport to be easily replaced with long-polling.

PHP Documentation

<?php
/**
	 * Filters Heartbeat Ajax response in no-privilege environments when no data is passed.
	 *
	 * @since 3.6.0
	 *
	 * @param array  $response  The no-priv Heartbeat response.
	 * @param string $screen_id The screen ID.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-admin/includes/ajax-actions.php
Related Hooks

Related hooks will be displayed here in future updates.