wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_role › WordPress Function

Od2.0.0
Przestarzałyn/a
get_role ( $role )
Parametry:
  • (string) $role Role name.
    Wymagane: Tak
Powrót:
  • (WP_Role|null) WP_Role object if found, null if the role does not exist.
Zdefiniowane na:
Codex:

Retrieves role object.



Źródło

function get_role( $role ) {
	return wp_roles()->get_role( $role );
}