[wp-hackers] edit_posts vs. edit_post

Ryan Boren ryan at boren.nu
Thu Jan 12 11:21:30 GMT 2006

On Thu, 2006-01-12 at 05:53 -0500, John Joseph Bachir wrote:
> Is there a difference between the capabilities edit_post and edit_posts, 
> or is one a typo? Both are used all over the code... I never see anwywhere 
> where edit_post is granted with add_cap though.
> I imagine I'm missing something, since edit_post is used so often, but I 
> cannot get my head around it...

edit_posts is a generic cap that says a user can edit posts, in general.
edit_post is more specific.  It is always accompanied by a post id and
means that the user can edit that particular post.  edit_post is a meta
cap that looks at whether the user can edit_posts, edit_others_posts, or
edit_published_posts to determine if the user can touch the given post.
See map_meta_cap() in wp-includes/capabilities.php for details.


More information about the wp-hackers mailing list