update_(meta_type)_meta action-hook . WP 2.9.0
Fires immediately before updating metadata of a specific type.
The dynamic portion of the hook, $meta_type, refers to the meta object type (post, comment, term, user, or any other type with an associated meta table).
Usage
add_action( 'update_(meta_type)_meta', 'action_function_name_7073', 10, 4 ); function action_function_name_7073( $meta_id, $object_id, $meta_key, $_meta_value ){ // action... }
- $meta_id(int)
- ID of the metadata entry to update.
- $object_id(int)
- ID of the object metadata is for.
- $meta_key(string)
- Metadata key.
- $_meta_value(mixed)
- Metadata value. Serialized if non-scalar.
Changelog
Since 2.9.0 | Introduced. |
Where the hook is called
update_(meta_type)_meta
update_(meta_type)_meta
wp-includes/meta.php 253
do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
wp-includes/meta.php 853
do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );