WP_User::level_reduction(int$max, string$item ): int
Since
2.0.0
Source
wp-includes/class-wp-user.php:687
Chooses the maximum level the user has.
Description
Will compare the level from the $item parameter against the $max parameter. If the item is incorrect, then just the $max parameter value will be returned. Used to get the max level based on the capabilities the user has. This is also based on roles, so if the user is assigned the Administrator role then the capability 'level_10' will exist and the user will get that value.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 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.