WP_User::translate_level_to_cap( int $level ): string
- Since
- 2.0.0
- Source
wp-includes/class-wp-user.php:849
Converts numeric level to level capability name.
Description
Prepends 'level_' to level number.
Parameters
$levelint- Level number, 1 to 10.
Return
string
Used by · 1
- WP_User::has_cap()Returns whether the user has the specified capability.
Source
public function translate_level_to_cap( $level ) { return 'level_' . $level; }History
Introduced in 2.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, from
src/wp-includes/class-wp-user.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.