delete_{$meta_type}meta WordPress Action Hook
The delete_{$meta_type}meta hook is triggered when a metadata value is deleted. It allows you to take an action when a metadata value is deleted. The hook takes two arguments: the meta ID and the post ID.
do_action( "delete_{$meta_type}meta", int $meta_id ) #
Fires immediately before deleting post or comment metadata of a specific type.
Description
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
delete_termmeta
delete_usermeta
Parameters
- $meta_id
(int)ID of the metadata entry to delete.
Source
File: wp-includes/meta.php
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |