Fires immediately before 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: - `delete_postmeta` - `delete_commentmeta`
$meta_id
Sortie :
@param int $meta_id ID of the metadata entry to delete.
// Ajouter une fonction au hook action 'delete_{$meta_type}meta'
add_action('delete_{$meta_type}meta', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($meta_id) {
// Votre code ici
error_log('Hook delete_{$meta_type}meta déclenché');
}
Chargement des actualités...