[wp-hackers] Partial admin capabilities

Michael D Adams mda at blogwaffe.com
Wed Jul 28 20:20:13 UTC 2010


On Wed, Jul 28, 2010 at 1:13 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:
> Ok, so where is the userid it is testing passed in?

Did you try either of the functions I pasted?

user_has_cap: http://pastebin.com/5HmAt92Q
The user_id is passed as key=1 in the 3rd argument to the filter.

map_meta_cap: http://pastebin.com/EYBeLKBD
The user_id is passed as the 3rd argument to the filter.

You only need to use one of those plugins.  I gave you both so you
could see how each filter works and decide for yourself which method
makes more sense to you.


More information about the wp-hackers mailing list