我一直在为我的主题添加帖子类型,如何隐藏/禁用“移动到垃圾桶”按钮?以下是我目前的代码:
$labels = array(
\'name\' => _x( \'Inhoud\', \'taxonomy general name\' ),
\'singular_name\' => _x( \'Inhoud\', \'taxonomy singular name\' ),
\'search_items\' => __( \'Zoek Inhoud\' ),
// \'popular_items\' => __( \'Popular Writers\' ),
\'all_items\' => __( \'Alle Inhoud\' ),
\'parent_item\' => null,
\'parent_item_colon\' => null,
\'edit_item\' => __( \'Wijzig Inhoud\' ),
\'update_item\' => __( \'Update Inhoud\' ),
\'add_new_item\' => __( \'Toevoegen Nieuwe Inhoud\' ),
// \'new_item_name\' => __( \'Nieuwe Evenement Naam\' ),
// \'separate_items_with_commas\' => __( \'Separate writers with commas\' ),
// \'add_or_remove_items\' => __( \'Add or remove writers\' ),
// \'choose_from_most_used\' => __( \'Choose from the most used writers\' ),
\'not_found\' => __( \'Geen inhoud gevonden.\' ),
\'menu_name\' => __( \'Inhoud\' ),
);
$args = array(
\'hierarchical\' => false,
\'labels\' => $labels,
\'show_ui\' => true,
//\'show_admin_column\' => true,
//\'update_count_callback\' => \'_update_post_term_count\',
\'menu_position\' => 7,
\'menu_icon\' => \'dashicons-admin-post\',
\'show_in_menu\' => true,
\'show_in_nav_menus\' => false,
\'show_in_admin_bar\' => false,
// \'query_var\' => true,
// \'rewrite\' => array( \'slug\' => \'inhoud\' ),
\'capabilities\' => array(
\'create_posts\' => \'do_not_allow\',
//\'edit_post\' => \'true\',
//\'delete_posts\' => \'do_not_allow\'
),
\'supports\' => array( ),
\'map_meta_cap\' => array(\'delete_post\' => false),
\'has_archive\' => true,
\'public\' => true
);
register_post_type( \'inhoud\', $args );