按如下方式注册自定义post类型,不会显示slug输入。知道为什么吗?
res = register_post_type( \'twig_anything_tmplt\', [
\'label\' => \'Twig Templates\',
\'labels\' => [
\'name\' => \'Twig Templates\',
\'singular_name\' => \'Twig Template\',
\'menu_name\' => \'Twig Templates\',
\'add_new_item\' => \'Add New Twig Template\',
\'edit_item\' => \'Edit Twig Template\',
\'new_item\' => \'New Twig Template\',
\'view_item\' => \'View Twig Template\',
\'search_items\' => \'Search Twig Templates\',
\'not_found\' => \'No Twig templates found\',
\'not_found_in_trash\' => \'No Twig templates found in trash\',
],
\'description\' => \'Twig templates used by the Twig Anything plugin.\',
\'exclude_from_search\' => true,
\'publicly_queryable\' => false,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'show_in_admin_bar\' => true,
\'menu_position\' => 20,
\'menu_icon\' => \'dashicons-images-alt2\',
\'hierarchical\' => false,
\'supports\' => [\'title\', \'editor\'],
\'has_archive\' => false,
\'rewrite\' => [
\'slug\' => \'twig_anything_tmplt\',
\'with_front\' => true,
\'feeds\' => false,
\'pages\' => false,
]
]);