heartbeat_nopriv_received
Filters Heartbeat Ajax response in no-privilege environments.
Использование
add_filter( 'heartbeat_nopriv_received', 'wp_kama_heartbeat_nopriv_received_filter', 10, 3 );
/**
* Function for `heartbeat_nopriv_received` filter-hook.
*
* @param array $response The no-priv Heartbeat response.
* @param array $data The $_POST data sent.
* @param string $screen_id The screen ID.
*
* @return array
*/
function wp_kama_heartbeat_nopriv_received_filter( $response, $data, $screen_id ){
// filter...
return $response;
}
- $response(массив)
- The no-priv Heartbeat response.
- $data(массив)
- The $_POST data sent.
- $screen_id(строка)
- The screen ID.
Список изменений
| С версии 3.6.0 | Введена. |
Где вызывается хук
wp-admin/includes/ajax-actions.php 43
$response = apply_filters( 'heartbeat_nopriv_received', $response, $data, $screen_id );