diff --git a/includes/CPT/Capabilities.php b/includes/CPT/Capabilities.php index 25e6940c..240d8245 100644 --- a/includes/CPT/Capabilities.php +++ b/includes/CPT/Capabilities.php @@ -9,9 +9,52 @@ class Capabilities protected static function currentCptArgs() { return [ + 'calendar_event' => [ + 'capability_type' => 'calevent', + 'capabilities' => [ + // Meta capabilities + 'edit_post' => 'edit_post', + 'read_post' => 'read_post', + 'delete_post' => 'delete_post', + // Primitive capabilities used outside of map_meta_cap() + 'edit_posts' => 'edit_posts', + 'edit_others_posts' => 'edit_others_posts', + 'publish_posts' => 'publish_posts', + 'read_private_posts' => 'read_private_posts', + // // Primitive capabilities used within map_meta_cap() + 'read' => 'read', + 'delete_posts' => 'delete_posts', + 'delete_private_posts' => 'delete_private_posts', + 'delete_published_posts' => 'delete_published_posts', + 'delete_others_posts' => 'delete_others_posts', + 'edit_private_posts' => 'edit_private_posts', + 'edit_published_posts' => 'edit_published_posts', + 'create_posts' => 'create_posts' + ], + 'map_meta_cap' => true + ], 'calendar_feed' => [ - 'capability_type' => ['page', 'pages'], - 'capabilities' => [], + 'capability_type' => 'calfeed', + 'capabilities' => [ + // Meta capabilities + 'edit_post' => 'edit_page', + 'read_post' => 'read_page', + 'delete_post' => 'delete_page', + // Primitive capabilities used outside of map_meta_cap() + 'edit_posts' => 'edit_pages', + 'edit_others_posts' => 'edit_others_pages', + 'publish_posts' => 'publish_pages', + 'read_private_posts' => 'read_private_pages', + // // Primitive capabilities used within map_meta_cap() + 'read' => 'read', + 'delete_posts' => 'delete_pages', + 'delete_private_posts' => 'delete_private_pages', + 'delete_published_posts' => 'delete_published_pages', + 'delete_others_posts' => 'delete_others_pages', + 'edit_private_posts' => 'edit_private_pages', + 'edit_published_posts' => 'edit_published_pages', + 'create_posts' => 'create_pages' + ], 'map_meta_cap' => true ] ];