[wp-hackers] Making Capability Manager site wide for MU

Ryan Boren ryan at boren.nu
Sun Nov 29 20:44:52 UTC 2009


On Sat, Nov 28, 2009 at 6:06 PM, Jordi Canals <jordi at jcanals.cat> wrote:
> 2009/11/29 scribu <scribu at gmail.com>
>
>> This feature would be really useful.
>>
>> Your implementation ideea looks solid to me.
>>
>> To clarify: this would not allow individual blogs to have different
>> capabilities for the same role, right? (This would be a good thing, in my
>> case)
>>
>>
> Thanks Scribu,
>
> I think you mean having a default site wide, and allow one or more blogs to
> be managed on it's own.
> At the first attempt I will do: Or managing blog by blog, or all blogs
> depending on global settings. After this working, in a next release, I can
> think about allowing some blogs to be 'independent'. (This last could not be
> so difficult, having the blog IDs, I think)
>
> Thanks again for your suggestion.

If the $wp_user_roles global is defined, it is used instead of the
roles in the options table.  Your plugin can store modifications in
site options and then use that site option to populate $wp_user_roles
during init.  On wordpress.com we just hard code the $wp_user_roles
array on wp-config since we rarely ever change it.  This avoids going
to the options table or site options table for role information.


More information about the wp-hackers mailing list