WordPress at a glance
filter is not described

update_(meta_type)_metadata filter-hook . WP 3.1.0

Short-circuits 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). Returning a non-null value will effectively short-circuit the function.

Usage

add_filter( 'update_(meta_type)_metadata', 'filter_function_name_7927', 10, 5 );
function filter_function_name_7927( $check, $object_id, $meta_key, $meta_value, $prev_value ){
	// filter...

	return $check;
}
$check(null/true/false)
Whether to allow updating metadata for the given type.
$object_id(int)
ID of the object metadata is for.
$meta_key(string)
Metadata key.
$meta_value(mixed)
Metadata value. Must be serializable if non-scalar.
$prev_value(mixed)
Optional. Previous value to check before updating. If specified, only update existing metadata entries with this value. Otherwise, update all entries.

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

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

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

update_metadata()
update_(meta_type)_metadata
wp-includes/meta.php 205
$check = apply_filters( "update_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $prev_value );

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

wp-includes/default-filters.php 112
add_filter( 'update_term_metadata', 'wp_check_term_meta_support_prefilter' );
wp-includes/ms-default-filters.php 63
add_filter( 'update_blog_metadata', 'wp_check_site_meta_support_prefilter' );