esc_html( $plural_label ), 'singular_name' => esc_html( $singular_label ), 'add_new_item' => sprintf( esc_html__( 'Add New %s', 'adirectory' ), esc_html( $singular_label ) ), 'new_item_name' => sprintf( esc_html__( 'New %s Name', 'adirectory' ), esc_html( $singular_label ) ), 'edit_item' => sprintf( esc_html__( 'Edit %s', 'adirectory' ), esc_html( $singular_label ) ), 'update_item' => sprintf( esc_html__( 'Update %s', 'adirectory' ), esc_html( $singular_label ) ), 'add_or_remove_items' => sprintf( esc_html__( 'Add or remove %s', 'adirectory' ), esc_html( strtolower( $plural_label ) ) ), 'search_items' => sprintf( esc_html__( 'Search %s', 'adirectory' ), esc_html( $plural_label ) ), 'popular_items' => sprintf( esc_html__( 'Popular %s', 'adirectory' ), esc_html( $plural_label ) ), 'all_items' => sprintf( esc_html__( 'All %s', 'adirectory' ), esc_html( $plural_label ) ), 'parent_item' => sprintf( esc_html__( 'Parent %s', 'adirectory' ), esc_html( $singular_label ) ), 'choose_from_most_used' => sprintf( esc_html__( 'Choose from the most used %s', 'adirectory' ), esc_html( strtolower( $plural_label ) ) ), 'parent_item_colon' => sprintf( esc_html__( 'Parent %s:', 'adirectory' ), esc_html( $singular_label ) ), 'menu_name' => esc_html( $plural_label ), ]; $default_args = [ 'labels' => $labels, 'public' => true, 'show_in_nav_menus' => true, 'show_admin_column' => false, 'hierarchical' => true, 'show_tagcloud' => false, 'show_ui' => true, 'capabilities' => [ 'manage_terms' => 'manage_categories', 'edit_terms' => 'manage_categories', 'delete_terms' => 'manage_categories', 'assign_terms' => 'read', ], ]; register_taxonomy( $taxonomy_key, $post_types, array_merge( $default_args, $args ) ); } }