updated_postmeta action-hookWP 2.9.0

Fires immediately after updating a post's metadata.

Usage

add_action( 'updated_postmeta', 'wp_kama_updated_postmeta_action', 10, 4 );

/**
 * Function for `updated_postmeta` action-hook.
 * 
 * @param int    $meta_id    ID of updated metadata entry.
 * @param int    $object_id  Post ID.
 * @param string $meta_key   Metadata key.
 * @param mixed  $meta_value Metadata value. This will be a PHP-serialized string representation of the value if the value is an array, an object, or itself a PHP-serialized string.
 *
 * @return void
 */
function wp_kama_updated_postmeta_action( $meta_id, $object_id, $meta_key, $meta_value ){

	// action...
}
$meta_id(int)
ID of updated metadata entry.
$object_id(int)
Post ID.
$meta_key(string)
Metadata key.
$meta_value(mixed)
Metadata value. This will be a PHP-serialized string representation of the value if the value is an array, an object, or itself a PHP-serialized string.

Changelog

Since 2.9.0 Introduced.

Where the hook is called

update_metadata()
updated_postmeta
update_metadata_by_mid()
updated_postmeta
wp-includes/meta.php 350
do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
wp-includes/meta.php 962
do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );

Where the hook is used in WordPress

Usage not found.