'edit_theme_options', 'edit_posts' => 'edit_theme_options', 'edit_others_posts' => 'edit_theme_options', 'edit_published_posts' => 'edit_theme_options', 'edit_private_posts' => 'edit_theme_options', 'read_private_posts' => 'edit_theme_options', 'publish_posts' => 'edit_theme_options', 'delete_posts' => 'edit_theme_options', 'delete_others_posts' => 'edit_theme_options', 'delete_published_posts' => 'edit_theme_options', 'delete_private_posts' => 'edit_theme_options', ]; $types = [ self::LAYOUT => 'Layout Nucleo', self::SECTION => __('Global section', 'nucleo'), ]; foreach ($types as $type => $label) { if (post_type_exists($type)) { continue; } register_post_type($type, [ 'label' => $label, 'public' => false, 'show_ui' => true, 'show_in_menu' => false, 'supports' => ['title'], 'capability_type' => 'page', 'map_meta_cap' => true, 'capabilities' => $capabilities, ]); } ModelRegistrar::registerAll(); } }