update_(meta_type)_meta хук-событиеWP 2.9.0

Fires immediately before 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:

Использование

add_action( 'update_(meta_type)_meta', 'wp_kama_update_meta_type_action', 10, 4 );

/**
 * Function for `update_(meta_type)_meta` action-hook.
 * 
 * @param int    $meta_id     ID of the metadata entry to update.
 * @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_update_meta_type_action( $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(строка)
Metadata key.
$_meta_value(разное)
Metadata value.

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

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

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

update_metadata()
update_(meta_type)_meta
update_metadata_by_mid()
update_(meta_type)_meta
wp-includes/meta.php 290
do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
wp-includes/meta.php 941
do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );

Где используется хук в WordPress

Использование не найдено.