updated_<meta_type>_meta

Fires immediately after updating metadata of a specific type.

Description

do_action( 'updated_<meta_type>_meta', (int) $meta_id, (int) $object_id, (string) $meta_key, (mixed) $meta_value ); 

The dynamic portion(s) of the hook refer to the meta object type (comment, post, or user).

Parameters (4)

0. $meta_id (int)
ID of updated metadata entry.
1. $object_id (int)
The object id.
2. $meta_key (string)
The meta key.
3. $meta_value (mixed)
The meta value.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'updated_{$meta_type}_meta', $meta_id, $object_id, $meta_key, $meta_value ); 
The following example is for adding a hook callback.
  1. // define the updated_<meta_type>_meta callback 
  2. function action_updated_meta_type_meta( $meta_id, $object_id, $meta_key, $meta_value ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( "updated_{$meta_type}_meta", 'action_updated_meta_type_meta', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( "updated_{$meta_type}_meta", 'action_updated_meta_type_meta', 10, 4 ); 

Defined (2)

The action is defined in the following location(s).

/wp-includes/meta.php  
  1. do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value ); 
  1. do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );