true). * * @param string $entity 'ad', 'group' or 'placement'. * * @return array */ function adpresso_get_post_type_capabilities( string $entity ): array { $edit = adpresso_get_capability( 'edit_' . $entity ); $delete = adpresso_get_capability( 'delete_' . $entity ); $others = adpresso_get_capability( 'edit_others_' . $entity ); return [ 'edit_posts' => $edit, 'edit_others_posts' => $others, 'edit_private_posts' => $edit, 'edit_published_posts' => $edit, 'publish_posts' => $edit, 'create_posts' => $edit, 'read_private_posts' => $edit, 'delete_posts' => $delete, 'delete_others_posts' => $others, 'delete_private_posts' => $delete, 'delete_published_posts' => $delete, 'read' => 'read', ]; }