deleted_(meta_type)meta action-hookWP 3.4.0

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:

Usage

add_action( 'deleted_(meta_type)meta', 'wp_kama_deleted_meta_typemeta_action' );

/**
 * Function for `deleted_(meta_type)meta` action-hook.
 * 
 * @param int $meta_id Deleted metadata entry ID.
 *
 * @return void
 */
function wp_kama_deleted_meta_typemeta_action( $meta_id ){

	// action...
}
$meta_id(int)
Deleted metadata entry ID.

Changelog

Since 3.4.0 Introduced.

Where the hook is called

delete_metadata_by_mid()
deleted_(meta_type)meta
wp-includes/meta.php 1088
do_action( "deleted_{$meta_type}meta", $meta_id );

Where the hook is used in WordPress

wp-includes/default-filters.php 116
add_action( 'deleted_post_meta', 'wp_cache_set_posts_last_changed' );
wp-includes/default-filters.php 121
add_action( 'deleted_user_meta', 'wp_cache_set_users_last_changed' );
wp-includes/default-filters.php 129
add_action( 'deleted_term_meta', 'wp_cache_set_terms_last_changed' );
wp-includes/default-filters.php 142
add_action( 'deleted_comment_meta', 'wp_cache_set_comments_last_changed' );
wp-includes/ms-default-filters.php 60
add_action( 'deleted_blog_meta', 'wp_cache_set_sites_last_changed' );