Documents Access Taxonomy
Used with the documents library to provide taxonomies to regulate access
if ( ! function_exists( 'register_docs_access_taxonomy' ) ) { // Register Custom Taxonomy function register_docs_access_taxonomy() { $labels = array( 'name' => _x( 'Access', 'Taxonomy General Name', 'wow' ), 'singular_name' => _x( 'Access', 'Taxonomy Singular Name', 'wow' ), 'menu_name' => __( 'Access', 'wow' ), 'all_items' => __( 'All Access Types', 'wow' ), 'parent_item' => __( 'Parent Access Type', 'wow' ), 'parent_item_colon' => __( 'Parent Access Type:', 'wow' ), 'new_item_name' => __( 'New Access Type', 'wow' ), 'add_new_item' => __( 'Add New Access Type', 'wow' ), 'edit_item' => __( 'Edit Access Type', 'wow' ), 'update_item' => __( 'Update Access Type', 'wow' ), 'view_item' => __( 'View Access Type', 'wow' ), 'separate_items_with_commas' => __( 'Separate Access Types with commas', 'wow' ), 'add_or_remove_items' => __( 'Add or remove Access Types', 'wow' ), 'choose_from_most_used' => __( 'Choose from the most used', 'wow' ), 'popular_items' => __( 'Popular Access Types', 'wow' ), 'search_items' => __( 'Search Access Types', 'wow' ), 'not_found' => __( 'Not Found', 'wow' ), 'no_terms' => __( 'No Access Types', 'wow' ), 'items_list' => __( 'Access Types list', 'wow' ), 'items_list_navigation' => __( 'Access Types list navigation', 'wow' ), ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => false, 'show_tagcloud' => false, 'show_in_rest' => true, ); register_taxonomy( 'docs-access', array( 'documents' ), $args ); } add_action( 'init', 'register_docs_access_taxonomy', 0 ); }