deprecated_hook_run

ACTION wp-includes\functions.php (ligne 5960) github
Fires when a deprecated hook is called.

Paramètres

Entrée :
$hook, $replacement, $version, $message
Sortie :
@param string $hook        The hook that was called.
@param string $replacement The hook that should be used as a replacement.
@param string $version     The version of WordPress that deprecated the argument used.
@param string $message     A message regarding the change.

Utilisation

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

function ma_fonction_personnalisee($hook, $replacement, $version, $message) {
    // Votre code ici
    error_log('Hook deprecated_hook_run déclenché');
}

Actualités

Chargement des actualités...