delete_(meta_type)_meta action-hookWP 3.1.0

Fires immediately before deleting metadata of a specific type.

The dynamic portion of the hook name, $meta_type, refers to the meta object type (post, comment, term, user, or any other type with an associated meta table).

Possible hook names include:

Usage

add_action( 'delete_(meta_type)_meta', 'wp_kama_delete_meta_type_action', 10, 4 );

/**
 * Function for `delete_(meta_type)_meta` action-hook.
 * 
 * @param string[] $meta_ids    An array of metadata entry IDs to delete.
 * @param int      $object_id   ID of the object metadata is for.
 * @param string   $meta_key    Metadata key.
 * @param mixed    $_meta_value Metadata value.
 *
 * @return void
 */
function wp_kama_delete_meta_type_action( $meta_ids, $object_id, $meta_key, $_meta_value ){

	// action...
}
$meta_ids(string[])
An array of metadata entry IDs to delete.
$object_id(int)
ID of the object metadata is for.
$meta_key(string)
Metadata key.
$_meta_value(mixed)
Metadata value.

Changelog

Since 3.1.0 Introduced.

Where the hook is called

delete_metadata()
delete_(meta_type)_meta
delete_metadata_by_mid()
delete_(meta_type)_meta
wp-includes/meta.php 476
do_action( "delete_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
wp-includes/meta.php 1031
do_action( "delete_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );

Where the hook is used in WordPress

Usage not found.