heartbeat_tick

ACTION wp-admin\includes\ajax-actions.php (ligne 3536) github
Fires when Heartbeat ticks in logged-in environments. Allows the transport to be easily replaced with long-polling.

Paramètres

Entrée :
$response, $screen_id
Sortie :
@param array  $response  The Heartbeat response.
@param string $screen_id The screen ID.

Utilisation

// Ajouter une fonction au hook action 'heartbeat_tick'
add_action('heartbeat_tick', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($response, $screen_id) {
    // Votre code ici
    error_log('Hook heartbeat_tick déclenché');
}

Actualités

Chargement des actualités...