[wp-hackers] Partial admin capabilities
John Blackbourn
johnbillion+wp at gmail.com
Wed Jul 28 09:50:53 UTC 2010
On Wed, Jul 28, 2010 at 8:29 AM, Ryan Bilesky <rbilesky at gmail.com> wrote:
> Thats my Psudo code based on my understanding on how this is going to work.
> So heres my thing, assuming I got that part of it right, how would I start
> off the function, what arguments would it receive and in what order to tell
> me what capability is being tested and what WordPresses reponse was.
The user_has_cap filter isn't an easy one for someone who isn't used
to WordPress, and it's not very well documented as you point out.
Here is a reasonably well commented block of code from a plugin of
mine I wrote for a client. It might help you to start to understand
it. This particular filter has a very specific purpose which is to
allow authors to edit contributors' posts if the post is pending.
http://pastebin.ca/1909968 .
HTH
John
More information about the wp-hackers
mailing list