delete_option_{$option}

ACTION wp-includes\option.php (ligne 1265) github
Fires after a specific option has been deleted. The dynamic portion of the hook name, `$option`, refers to the option name.

Paramètres

Entrée :
$option
Sortie :
@param string $option Name of the deleted option.

Utilisation

// Ajouter une fonction au hook action 'delete_option_{$option}'
add_action('delete_option_{$option}', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($option) {
    // Votre code ici
    error_log('Hook delete_option_{$option} déclenché');
}

Actualités

Chargement des actualités...