deleted_{$meta_type}meta

ACTION wp-includes\meta.php (ligne 1118) github
Fires immediately after deleting post or comment metadata of a specific type. The dynamic portion of the hook name, `$meta_type`, refers to the meta object type (post or comment). Possible hook names include:  - `deleted_postmeta`  - `deleted_commentmeta`

Paramètres

Entrée :
$meta_id
Sortie :
@param int $meta_id Deleted metadata entry ID.

Utilisation

// Ajouter une fonction au hook action 'deleted_{$meta_type}meta'
add_action('deleted_{$meta_type}meta', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($meta_id) {
    // Votre code ici
    error_log('Hook deleted_{$meta_type}meta déclenché');
}

Actualités

Chargement des actualités...