[wp-hackers] Partial admin capabilities
Ryan Bilesky
rbilesky at gmail.com
Wed Jul 28 07:29:15 UTC 2010
Ok so heres my problem. I am new to wordpress so please bear with me.
I have an idea of how this works, I just am not quite sure how to turn that
into the actual finished code.
Correct me if I am wrong but this is the way I see it.
Wordpress executes current_user_can(), I capture the the result that would
send my adding a filter for "user_has_cap" and I have a function that would
decide on the final response retuened via current_user_can. I would start
off by having it return false if wordpresses reponse is false. If
wordpresses reponse is true, and if it is one of the capabilities I care
about I say if the current user id == 1 return true, else return false.
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.
On Tue, Jul 27, 2010 at 11:58 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:
> That would defiantly depend on if I can figure this out.
>
>
> On Tue, Jul 27, 2010 at 11:44 PM, Peter Westwood <
> peter.westwood at ftwr.co.uk> wrote:
>
>>
>> On 27 Jul 2010, at 23:40, Ryan Bilesky wrote:
>>
>> > Thanks for the ideas. I'll try them if I can figure out how, neither is
>> all
>> > that well documented in the codex, just red links to non existant pages.
>> > But i'll see if I can figure it out.
>> >
>> >
>>
>> It would be great if you could add some documentation to the codex when
>> you have worked out what works best if you have the time.
>>
>> Then the next person will be able to benefit from the journey of discovery
>> you have been on.
>>
>> Cheers
>> --
>> Peter Westwood
>> http://blog.ftwr.co.uk | http://westi.wordpress.com
>> C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
>
More information about the wp-hackers
mailing list