1

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.

  • 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
1

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.

0

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

And also the Ultimate Guide to Roles and Capabilities

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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