get_editable_user_ids()
get_editable_user_ids( int $user_id, bool $exclude_zeros = true, $post_type = ‘post’ )
获取任何可以编辑文章的用户的ID。
Gets the IDs of any users who can edit posts.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$user_id | (int) | 必需 | 用户ID。 |
$exclude_zeros | (bool) | 可选 | 是否排除零。 |
返回(Return)
(array)可编辑用户ID的数组,否则为空数组。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.1.0 | wp-admin/includes/deprecated.php:280 | 2 | 7 |
get_editable_user_ids() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_editable_user_ids/