If I had to guess: because images are Attachments, and Attachments are a Post-Type. Thus, in order to edit an image, which is an attachment, which is a post, requires the edit_post
capability.
EDIT
Don’t you have your capability
mapping array keys/values reversed?
e.g. you have 'edit_posts' => 'edit_listings'
. Shouldn’t it instead be 'edit_listings' => 'edit_posts'
?
Related Posts:
- Allow member to have access to custom post type only. Permission to only edit their own posts
- Possible to hide Custom Post Type UI/Menu from specific User Roles?
- add_image_size() for specific Post Types
- Creating an Image-Centric Custom Post Type?
- How to disable generation of default image sizes for some custom post types?
- Custom post type role permissions won’t let me read
- Allowing custom role access to custom post type in back end
- Restrict Contributors to view only their own custom post types?
- Custom user role cannot see or modify featured image
- How to assign specific users the capability to edit specific pages / posts / custom post types
- Allow user to Edit Posts but not Add New?
- Defining capabilities for custom post type
- Assign a Custom Role to a Custom Post?
- Restrict custom post type view by user role
- Creating custom user roles
- List most recent image uploads, but only for specific custom post type
- Confusion with adding meta capabilities to a role after registering a Custom Post Type with corresponding ‘capability_type’ parameter
- set_post_thumbnail_size in percent, not pixels?
- How to add a CSS class to every image in a Custom Post Type
- Can I make user role that can only access a certian content type?
- Associating an “author” with a custom taxonomy
- Custom post type Admin Page
- Create user role restricted to specific CPT
- How to set individual capabilities on a taxonomy? Or how to re-register an existing taxonomy?
- User roles – enable custom posts disable posts
- Add Capabilities to Custom Post Type after it has been created [duplicate]
- How to not allow custom roles to edit published custom post types?
- Extract image src from a post and send it to an external form
- Removing Image Sizes for Custom Post Type
- How to restrict specific post types from being read or added by specific user roles (eg. author)?
- Image size filtering in Media uploader according to custom post type
- Count all images of a certain post type
- How can I get the last posts by user role?
- How do I code access to the built-in UI of a CPT when it’s placed as submenu of another CPT that is protected by role?
- Custom user role not working as expected
- How to get source of custom meta image?
- Stopping WordPress from Auto Generating Image Files for Sizes
- Which User Role for Custom Post Type Menu – wp_nav
- Uploaded image not appearing in custom post type
- Allowing custom role user to edit post assigned to them but don’t let them create new custom type post
- How can I add image sizes for a specific custom post type?
- I want to show post details based on roles user login
- Multiple useres editing specified content
- Change picture attachment meta of all occurrences of a picture
- Instructor can view, edit, delete only theirs courses
- Front-end submitted post is published with admin ID as author
- Dupplication of Custom Post Type while adding attachment
- Media is not showing on post page
- WooThemes – Vendors / Bookings – Allow Vendors to manage resources
- How do you make a custom post type invisible for subscribers
- Looping through image object using ACF and CPT UI [SOLVED]
- Multi Photo Upload with Caption on Front End for Custom Post Type
- Front End users account with lots of user Roles (not Woocommerce)
- Capibilities of CPT WordPress
- Displaying image instead of post label in wordpress
- How can I remove “Add new” button on custom post type
- Links Image in “Catalog” Page to Posts
- Capabilities and mapping required for a role to be able to edit other’s posts of a custom type, BUT only be able to edit their own blog posts
- Custom user roles
- Editor role isn’t seeing specific post type posts with only post_type parameter
- How do I set a specific size for my image?
- Allow viewing the edit screen for a post type, but not make/save/publish/update changes
- Trying to get custom post type attachment images to function in indexed array
- Weird capabilities / roles behavior
- Control what custom posts a user can see
- Custom Post Type only display items created by user
- Add role privileges of the custom post type
- Prevent author role from editing others posts
- Working with gallery shortcode and get gallery images
- creating different edit screens for different roles
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Custom taxonomy archive is visible to only subscibed users
- CPT, Custom User Role and problem with user manager
- Image paths on custom post types getting /post_type/ added to path
- Custom post type media upload error with custom user role
- Display and Allow users to edit their own profiles
- Custom Post Type supports author
- Retrieve post data via WPDB class
- Capability to read user’s own draft post of CPT
- Custom role, capabilities, and post type: preview button wrecks things
- Reservations as Post
- Custom post type & role issues
- How to Create a Frontend Html-list Editable in the Backend?
- Allow authors to create article image
- Custom role can’t create permalink
- empty dashboard for custom role
- Read-Only custom post type
- Add Image field to CPT
- Custom Plugin w/ Custom Post Types – Custom Posts Are Showing at all Privilege Levels – Is this possible to adjust?
- img src not working correctly in custom post type
- Add a background image into a post [closed]
- Front end post or photo or both
- WordPress Roles
- Using wp_insert_post to create custom posts with ACF image field
- set_post_thumbnail or media_sideload_image adds image multiple times in media library
- How to Create Grey Background for Product Images on Website Display but Retain White Background on Downloaded JPGs?
- Need some suggestions with Relationship fields and CPT/ACF
- Frontend delete CPT post with custom role user
- WordPress User Role Permissions For Custom Post Type
- Allowing a CPT post to be edited by a single user role