WordPress at Your Fingertips
filter is not described

auth_(object_type)_meta_(meta_key)_for_(object_subtype) filter-hook . 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_8851', 10, 6 );
function filter_function_name_8851( $allowed, $meta_key, $object_id, $user_id, $cap, $caps ){
	// filter...

	return $allowed;
Whether the user can add the object meta.
Default: false
The meta key.
Object ID.
User ID.
Capability name.
Array of the user's capabilities.


Since 4.9.8 Introduced.

Where the hook is called

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

Where in WP core the hook is used WordPress

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