Filters whether the user is allowed to edit a specific meta key of a specific object type.
Description
Return true to have the mapped meta caps from edit_{$object_type} apply. The dynamic portion of the hook name, $object_type refers to the object type being filtered.The dynamic portion of the hook name, $meta_key, refers to the meta key passed to map_meta_cap().
Parameters
$allowedbool
Whether the user can add the object meta. Default false.
512<?php513 * @param string $meta_key The meta key.514 * @param int $object_id Object ID.515 * @param int $user_id User ID.516 * @param string $cap Capability name.517 * @param string[] $caps Array of the user's capabilities.518 */519 $allowed = apply_filters( "auth_{$object_type}_meta_{$meta_key}", $allowed, $meta_key, $object_id, $user_id, $cap, $caps );520 }521522 /**523 * Filters whether the user is allowed to edit meta for specific object types/subtypes.524 *525 * Return true to have the mapped meta caps from `edit_{$object_type}` apply.
History
Introduced in 4.6.0. Unchanged from 6.7.7 through 7.1.0.