LLMS_Roles::get_all_role_names()

Returns an array of role names.


Description Description

LLMS roles and WP core roles are translated.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.roles.php

	public static function get_all_role_names() {

		$all_roles = wp_roles()->roles;

		return array_merge(
			array_combine(
				array_keys( $all_roles ),
				array_map(
					'translate_user_role', // Translates WP Core roles.
					array_column( $all_roles, 'name' )
				)
			),
			self::get_roles() // So our roles are translated as well.
		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.