WP_User::translate_level_to_cap() WordPress Method

The WP_User::translate_level_to_cap() method is used to translate a user's level to a capability.

WP_User::translate_level_to_cap( int $level ) #

Converts numeric level to level capability name.


Description

Prepends ‘level_’ to level number.


Top ↑

Parameters

$level

(int)(Required)Level number, 1 to 10.


Top ↑

Return

(string)


Top ↑

Source

File: wp-includes/class-wp-user.php

	public function translate_level_to_cap( $level ) {
		return 'level_' . $level;
	}


Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.