auth_{$object_type}_meta_{$meta_key}

最后更新于:2021-11-25 20:40:38

apply_filters( “auth_{$object_type}_meta_{$meta_key}”, bool $allowed, string $meta_key, int $object_id, int $user_id, string $cap, string[] $caps )

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

参数

$allowed

(bool)
Whether the user can add the object meta. Default false.

$meta_key

(string)
The meta key.

$object_id

(int)
Object ID.

$user_id

(int)
User ID.

$cap

(string)
Capability name.

$caps

(string[])
Array of the user’s capabilities.

源文件

文件: gc-includes/capabilities.php

View on Trac