Files
Filename | Hook Type | Line Number | PHP Doc |
---|---|---|---|
wp-includes/capabilities.php | apply_filters | 486 | /** * 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. * * @since 4.9.8 * * @param bool $allowed Whether the user can add the object meta. Default false. * @param string $meta_key The meta key. * @param int $object_id Object ID. * @param int $user_id User ID. * @param string $cap Capability name. * @param string[] $caps Array of the user's capabilities. */ |
wp-includes/capabilities.php | apply_filters | 507 | /** * Filters whether the user is allowed to edit a specific meta key of a specific object type. * * 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(). * * @since 3.3.0 As `auth_post_meta_{$meta_key}`. * @since 4.6.0 * * @param bool $allowed Whether the user can add the object meta. Default false. * @param string $meta_key The meta key. * @param int $object_id Object ID. * @param int $user_id User ID. * @param string $cap Capability name. * @param string[] $caps Array of the user's capabilities. */ |
Hook Parameters
Parameter Type | Name | Description |
---|---|---|
bool | $allowed | Whether the user can add the object meta. Default false. |
string | $meta_key | The meta key. |
int | $object_id | Object ID. |
int | $user_id | User ID. |
string | $cap | Capability name. |
string[] | $caps | Array of the user's capabilities. |
bool | $allowed | Whether the user can add the object meta. Default false. |
string | $meta_key | The meta key. |
int | $object_id | Object ID. |
int | $user_id | User ID. |
string | $cap | Capability name. |
string[] | $caps | Array of the user's capabilities. |