Modify types plugin for custom post type capabilities

Put this code in—–>
plugins/types/embedded/includes/custom-types.php

$data['capability_type'] = 'post';
$data['map_meta_cap'] = true;

$data['capabilities'] = array(

'read_post' => 'read_'.$post_type,
'delete_post' => 'delete_'.$post_type,
'publish_post' => 'publish_'.$post_type,
'edit_post' => 'edit_'.$post_type,
'edit_others_posts' => "edit_others_".$post_type.'s',
'publish_posts' => "publish_".$post_type.'s',
'read_private_posts' => "read_private_".$post_types,
'delete_posts' => "delete_".$post_types,
'delete_private_posts' => "delete_private_".$post_type,
'delete_published_posts' => "delete_published_".$post_type.'s',
'delete_others_posts' => "delete_others_".$post_type.'s',
'edit_private_posts' => "edit_private_".$post_type.'s',
'edit_published_post' => "edit_published_".$post_type,
'edit_published_posts' => "edit_published_".$post_type.'s',

);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s