updated_(meta_type)_meta
Fires immediately after updating 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( 'updated_(meta_type)_meta', 'wp_kama_updated_meta_type_action', 10, 4 ); /** * Function for `updated_(meta_type)_meta` action-hook. * * @param int $meta_id ID of updated metadata entry. * @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_updated_meta_type_action( $meta_id, $object_id, $meta_key, $_meta_value ){ // action... }
- $meta_id(int)
- ID of updated metadata entry.
- $object_id(int)
- ID of the object metadata is for.
- $meta_key(string)
- Metadata key.
- $_meta_value(mixed)
- Metadata value.
Changelog
Since 2.9.0 | Introduced. |
Where the hook is called
updated_(meta_type)_meta
updated_(meta_type)_meta
wp-includes/meta.php 336
do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
wp-includes/meta.php 959
do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
Where the hook is used in WordPress
wp-includes/default-filters.php 121
add_action( 'updated_post_meta', 'wp_cache_set_posts_last_changed' );
wp-includes/default-filters.php 126
add_action( 'updated_user_meta', 'wp_cache_set_users_last_changed' );
wp-includes/default-filters.php 134
add_action( 'updated_term_meta', 'wp_cache_set_terms_last_changed' );
wp-includes/default-filters.php 147
add_action( 'updated_comment_meta', 'wp_cache_set_comments_last_changed' );
wp-includes/ms-default-filters.php 59
add_action( 'updated_blog_meta', 'wp_cache_set_sites_last_changed' );