[wp-hackers] User Capabilities

Owen Winkler ringmaster at midnightcircus.com
Sun Jul 10 22:33:10 GMT 2005


Ryan Boren wrote:

>How about we just tell plugin authors to specify "level_X" capabilities
>when creating new roles?  One day, when levels are deprecated entirely,
>we can simply ignore any level_x capabilities and not be left with any
>user_level cruft in the role/cap API.
>  
>
Ok by me.
It would be cool if there was an easy way to tag these emails so that 
they get transferred to Codex in the future.

>>When the system updates a user's role, the WP_User class would filter 
>>through allcaps (after the role change) looking for the highest 
>>"level_x" and then use that to set the user_level for backwards 
>>compatibility.
>>    
>>
>Sounds good.
>  
>
Merged and working.

>>Similarly - I'm just noting this now - capabilities.php probably 
>>shouldn't be using translate_level_to_role() from upgrade_functions.php, 
>>    
>>
>I think that is just leftover.  It can probably be removed.
>  
>
Removed.
New capabilities.php attached.

Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: capabilities.php
Type: text/x-patch
Size: 6670 bytes
Desc: not available
Url : http://comox.textdrive.com/pipermail/wp-hackers/attachments/20050710/fec8b412/capabilities.bin


More information about the wp-hackers mailing list