WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Черная пятница на сайте Template Monster
фильтр не описан

auth_(object_type)_meta_(meta_key)_for_(object_subtype) хук-фильтр . WP 4.9.8

Filters whether the user is allowed to edit a specific meta key of a specific object type and subtype.

The dynamic portions of the hook name, $object_type, $meta_key, and $object_subtype, refer to the metadata object type (comment, post, term or user), the meta key value, and the object subtype respectively.

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

add_filter( 'auth_(object_type)_meta_(meta_key)_for_(object_subtype)', 'filter_function_name_3408', 10, 6 );
function filter_function_name_3408( $allowed, $meta_key, $object_id, $user_id, $cap, $caps ){
	// filter...

	return $allowed;
}
$allowed(true/false)
Whether the user can add the object meta.
По умолчанию: false
$meta_key(строка)
The meta key.
$object_id(число)
Object ID.
$user_id(число)
User ID.
$cap(строка)
Capability name.
$caps(строка[])
Array of the user's capabilities.

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

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

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

map_meta_cap()
auth_(object_type)_meta_(meta_key)_for_(object_subtype)
wp-includes/capabilities.php 321
$allowed = apply_filters( "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $allowed, $meta_key, $object_id, $user_id, $cap, $caps );

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

wp-includes/meta.php 1226
add_filter( "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $args['auth_callback'], 10, 6 );
wp-includes/meta.php 1293
remove_filter( "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $args['auth_callback'] );