Taksonomia niestandardowa - ustawianie dostępu na podstawie roli lub możliwości

Uczę się tylko o niestandardowych taksonomiach dla Wordpress. Jak można ograniczyć dostęp moim użytkownikom do korzystania z taksonomii. Na przykład stworzyłem nazwę taksonomiifeatured i chcę tylko, aby redaktorzy i wyżej wymienione role mogli dodawać posty do tej taksonomii.

Jak ustawić poziom dostępu? Zarówno w zależności od roli użytkownika, jak i możliwości, oba działają na mnie.

Oto kod, którego używam do mojej taksonomii:

function add_custom_taxonomies() {
    // Add new "Featured" taxonomy to Posts
    register_taxonomy('featured', 'post', array(
        // Hierarchical taxonomy (like categories)
        'hierarchical' => true,
        // This array of options controls the labels displayed in the WordPress Admin UI
        'labels' => array(
            'name' => _x( 'Featured', 'taxonomy general name' ),
            'singular_name' => _x( 'Featured', 'taxonomy singular name' ),
            'search_items' =>  __( 'Search Featured' ),
            'all_items' => __( 'All Featured' ),
            'parent_item' => __( 'Parent Featured' ),
            'parent_item_colon' => __( 'Parent Featured:' ),
            'edit_item' => __( 'Edit Featured' ),
            'update_item' => __( 'Update Featured' ),
            'add_new_item' => __( 'Add New Featured' ),
            'new_item_name' => __( 'New Featured Name' ),
            'menu_name' => __( 'Featured' ),
        ),
        // Control the slugs used for this taxonomy
        'rewrite' => array(
            'slug' => 'featured', // This controls the base slug that will display before each term
            'with_front' => false, // Don't display the category base before "/locations/"
            'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/"
        ),
    ));
}
add_action( 'init', 'add_custom_taxonomies', 0 );

questionAnswers(1)

yourAnswerToTheQuestion