$args = array(
'label' => __('orders', $text_domain),
'description' => __('Orders', $text_domain),
'labels' => $labels,
'supports' => array('title', 'editor', 'excerpt', 'revisions', 'custom-fields'),
'hierarchical' => false,
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-clipboard',
'can_export' => false,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => false,
'capability_type' => 'post',
'capabilities' => array(
'create_posts' => false, // Removes support for the "Add New" function
'delete_posts' => true,
// 'edit_posts' => false, // Removes support for the "Add New" function
),
'map_meta_cap' => true,
);
我在论证中有这个,它的功能delete_posts
设置为true
。但是当我尝试删除任何项目时,我收到消息:You are not allowed to move this item to the Trash.
。什么是解决方案?