Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've created a custom post type called 'directory' and assigned it the capability type of 'listing'. It has a unique capability type because I want to restrict Contributors to only be able to create/edit/publish this post type, which I am restricting via capabilities. There are the capabilities that were created by the MapCap plugin:

  • Delete listings
  • Delete published listing posts
  • Edit listings
  • Edit private listing posts
  • Edit published listing posts
  • Publish listings
  • Read private listings

For the Contributor, everything is working properly, and he/she can create, and only edit his/her own posts, and can upload attachments.

The Admin account has all the same capabilities, but isn't fully working. I can create a post, and edit any of the others. But it does not give me full rights to the attachments. In the media library, any files I upload with this custom post type can't be deleted when I am logged in as the admin. (I am still able to Trash the attachments by other authors, just not my own uploaded as admin.)

The closest thing I've found is this message on WordPress Trac that describes how attachments can't be edited without the edit_post/delete_post capability.

I assume this is simply a matter of me not having proper capabilities assigned to the post type, but I've not had any luck finding the right combination.

share|improve this question
    
I think this is ultimately a question about capabilities. Can anyone point me to a more comprehensive desscription of how cababilites word beyond the WordPress codex? –  John Chandler Jan 25 '11 at 17:19

2 Answers 2

My educated guess is the issue comes from attachment being separate post type. It might seem like utility by purpose, but by nature it is specialized post type.

Unfortunately your specific setup is not trivial to reproduce to confirm.

share|improve this answer

Here is a bit more info on Capabilities, it might clarify things for you.

And also the Ultimate Guide to Roles and Capabilities

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.