Skip to main content
10 events
when toggle format what by license comment
Dec 31, 2011 at 20:07 vote accept PrivateUser
Dec 31, 2011 at 19:53 answer added Kailey Lampert timeline score: 5
Dec 31, 2011 at 19:41 comment added hakre No, you need to get the roles of the user (e.g. admin), compare against (admin, editor), if it matches, do that action. That's it.
Dec 31, 2011 at 19:36 comment added PrivateUser Yes i understand all that roles and caps thing. But I should replace with what? Lets say i need only editors and admins can view all posts. I should replace with what? you mean like $level_5 instead of $user_level The above code uses query stuffs. I really have no knowledge in that query stuff. So i really appreciate if you can just copy the above code and replace it with the cap of author. Thanks
Dec 31, 2011 at 19:20 comment added hakre You only need to replace the $user_level with the appropriate role, see Roles and Capabilities: User Levels which level relates to which role.
Dec 31, 2011 at 19:15 comment added PrivateUser Can you give me the code? I tried but its not working.
Dec 31, 2011 at 18:36 comment added hakre Okay, I see. As $user_level is deprecated, you might be able to check for it's role(s) then instead.
Dec 31, 2011 at 18:29 comment added PrivateUser Yes i'm aware of roles and caps. But i'm trying to give permissions to submit content for all registered users (subscribers). But I don't want to list all posts
Dec 31, 2011 at 18:21 comment added hakre Are you aware of the Roles and Capabilities that wordpress offers by default? Especially Author - Somebody who can publish and manage their own posts
Dec 31, 2011 at 17:53 history asked PrivateUser CC BY-SA 3.0