0
X
Add Snippet To Project
New Project
Add To Existing Project
/**
* Registers the 'stretcher_category' taxonomy.
*
* @return void
*/
function register_stretcher_category_taxonomy() : void {
$labels = [
'name' => _x( 'Stretcher Categorys', 'Taxonomy Name', 'hausted' ),
'singular_name' => _x( 'Stretcher Category', 'Taxonomy Singular Name', 'hausted' ),
'menu_name' => __( 'Stretcher Categorys ', 'hausted' ),
'all_items' => __( 'All Stretcher Categorys ', 'hausted' ),
'parent_item' => __( 'Parent Stretcher Category ', 'hausted' ),
'parent_item_colon' => __( 'Parent Stretcher Category: ', 'hausted' ),
'new_item_name' => __( 'New Stretcher Category ', 'hausted' ),
'add_new_item' => __( 'Add New Stretcher Category ', 'hausted' ),
'edit_item' => __( 'Edit Stretcher Category ', 'hausted' ),
'update_item' => __( 'Update Stretcher Category ', 'hausted' ),
'view_item' => __( 'View Stretcher Category ', 'hausted' ),
'add_or_remove_items' => __( 'Add or Remove Stretcher Categorys ', 'hausted' ),
'choose_from_most_used' => __( 'Choose from most used Stretcher Categorys ', 'hausted' ),
'popular_items' => __( 'Popular Stretcher Categorys ', 'hausted' ),
'search_items' => __( 'Search Stretcher Categorys ', 'hausted' ),
'not_found' => __( 'Not Found ', 'hausted' ),
'no_terms' => __( 'No Stretcher Categorys ', 'hausted' ),
'items_list' => __( 'Stretcher Categorys List ', 'hausted' ),
'items_list_navigation' => __( 'Stretcher Categorys List Navigation ', 'hausted' ),
];
$args = [
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'show_in_rest' => true,
'rest_base' => 'stretcher_category',
'rest_controller_class' => 'WP_REST_stretcher_category_Terms_Controller',
];
register_taxonomy( 'stretcher_category', ['stretchers'], $args );
}
add_action( 'init', 'register_stretcher_category_taxonomy' );
Stretcher Categories