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.
Parameters
- $level
(int)(Required)Level number, 1 to 10.
Return
(string)
Source
File: wp-includes/class-wp-user.php
public function translate_level_to_cap( $level ) { return 'level_' . $level; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |