CPT edit others posts
-
Hi,
I have the following custom post type in my theme…
$args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'device' ), 'capability_type' => 'device', 'capabilities' => array( 'create_posts' => 'create_devices', 'publish_posts' => 'publish_devices', 'edit_posts' => 'edit_devices', 'edit_others_posts' => 'edit_others_devices', 'edit_published_posts'=> 'edit_published_devices', 'read_private_posts' => 'read_private_devices', 'edit_post' => 'edit_device', 'delete_post' => 'delete_device', 'read_post' => 'read_device' ), 'has_archive' => false, 'menu_icon' => 'dashicons-smartphone', 'hierarchical' => true, 'menu_position' => null, 'supports' => array( 'title', 'page-attributes', 'thumbnail' ) ); register_post_type( 'my_device', $args );
It’s basically a custom post type for devices we have around the office. I have a user role called “IT” who will manage all of these devices. I had a script I wrote that imported these devices from a CSV, and even giving the IT role the “edit_others_devices” capability, he doesn’t have access to update the devices from the script… do I need to give him some sort of other permission?
Thanks,
–d
- The topic ‘CPT edit others posts’ is closed to new replies.