function translate_level_to_role($level) {}

Translate user level to user role name.


  • int $level: User level.

Return values

returns:User role name.

Source code

function translate_level_to_role($level) {

	switch ($level) {

	case 10:

	case 9:

	case 8:

		return 'administrator';

	case 7:

	case 6:

	case 5:

		return 'editor';

	case 4:

	case 3:

	case 2:

		return 'author';

	case 1:

		return 'contributor';

	case 0:

		return 'subscriber';




No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: