Function: get_editable_user_ids

get_editable_user_ids( integer $user_id, boolean $exclude_zeros, $post_type )

Gets the IDs of any users who can edit posts.


Name Type(s) Default Value Description
$user_id integer

User ID.

$exclude_zeros boolean true

Optional. Whether to exclude zeroes. Default true.

$post_type 'post'



Array of editable user IDs, empty array otherwise.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.