get_editable_roles()

最后更新于:2021-11-26 09:07:04

get_editable_roles()

Fetch a filtered list of user roles that the current user is allowed to edit.

响应

(array[]) Array of arrays containing role information.

源文件

文件: gc-admin/includes/user.php

function get_editable_roles() {
	$all_roles = gc_roles()->roles;

	/**
	 * Filters the list of editable roles.
	 *
	 * @since 2.8.0
	 *
	 * @param array[] $all_roles Array of arrays containing role information.
	 */
	$editable_roles = apply_filters( 'editable_roles', $all_roles );

	return $editable_roles;
}