$value ) { $role->add_cap( $capability ); } } add_role( 'author', 'Redakteur', kompass_get_capa_editor() ); $role = get_role( 'user' ); if ( null === $role ) { add_role( 'user', 'Standardnutzer', array('read' => true) ); } else { foreach ( solea_get_capabilities_user() as $capability => $value ) { $role->add_cap( 'read' ); } } } function kompass_get_capa_editor() : array { return [ 'moderate_comments' => true, 'manage_categories' => true, 'manage_links' => true, 'upload_files' => true, 'unfiltered_html' => true, 'edit_posts' => true, 'edit_others_posts' => true, 'edit_published_posts' => true, 'publish_posts' => true, 'edit_pages' => true, 'read' => true, 'level_7' => true, 'level_6' => true, 'level_5' => true, 'level_4' => true, 'level_3' => true, 'level_2' => true, 'level_1' => true, 'level_0' => true, 'edit_others_pages' => true, 'edit_published_pages' => true, 'publish_pages' => true, 'delete_pages' => true, 'delete_others_pages' => true, 'delete_published_pages' => true, 'delete_posts' => true, 'delete_others_posts' => true, 'delete_published_posts' => true, 'delete_private_posts' => true, 'edit_private_posts' => true, 'read_private_posts' => true, 'delete_private_pages' => true, 'edit_private_pages' => true, 'read_private_pages' => true, ]; }