heartbeat_tick
Fires when Heartbeat ticks in logged-in environments.
Allows the transport to be easily replaced with long-polling.
Использование
add_action( 'heartbeat_tick', 'wp_kama_heartbeat_tick_action', 10, 2 ); /** * Function for `heartbeat_tick` action-hook. * * @param array $response The Heartbeat response. * @param string $screen_id The screen ID. * * @return void */ function wp_kama_heartbeat_tick_action( $response, $screen_id ){ // action... }
- $response(массив)
- The Heartbeat response.
- $screen_id(строка)
- The screen ID.
Список изменений
С версии 3.6.0 | Введена. |
Где вызывается хук
wp-admin/includes/ajax-actions.php 3526
do_action( 'heartbeat_tick', $response, $screen_id );