Skip to content

Commit

Permalink
Merge pull request #139 from RRZE-Webteam/dev
Browse files Browse the repository at this point in the history
Update Capabilities.php
  • Loading branch information
rvdforst authored Jul 21, 2023
2 parents 104331b + 536e373 commit dd6d41e
Showing 1 changed file with 45 additions and 2 deletions.
47 changes: 45 additions & 2 deletions includes/CPT/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
];
Expand Down

0 comments on commit dd6d41e

Please sign in to comment.