deleted_(meta_type)meta хук-событиеWP 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:


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...
Deleted metadata entry ID.

Список изменений

С версии 3.4.0 Введена.

Где вызывается хук

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

Где используется хук в 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' );