heartbeat_nopriv_tick

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

Paramètres

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

Utilisation

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

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

Actualités

Chargement des actualités...