即使delete_posts为true,也不允许将此项目移至回收站

时间:2016-04-04 12:12:47

标签: wordpress wordpress-plugin custom-wordpress-pages

$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.。什么是解决方案?

0 个答案:

没有答案