Filter hook 'heartbeat_nopriv_received'

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

View Source

heartbeat_nopriv_received

Filter Hook
Description
Filters Heartbeat Ajax response in no-privilege environments.

Hook Information

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

Hook Parameters

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

Usage Examples

Basic Usage
<?php
// Hook into heartbeat_nopriv_received
add_filter('heartbeat_nopriv_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:43 - How this hook is used in WordPress core
<?php
  38  		 *
  39  		 * @param array  $response  The no-priv Heartbeat response.
  40  		 * @param array  $data      The $_POST data sent.
  41  		 * @param string $screen_id The screen ID.
  42  		 */
  43  		$response = apply_filters( 'heartbeat_nopriv_received', $response, $data, $screen_id );
  44  	}
  45  
  46  	/**
  47  	 * Filters Heartbeat Ajax response in no-privilege environments when no data is passed.
  48  	 *

PHP Documentation

<?php
/**
		 * Filters Heartbeat Ajax response in no-privilege environments.
		 *
		 * @since 3.6.0
		 *
		 * @param array  $response  The no-priv 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.