Taxonomy_Manager::register_form_category_taxonomy()

Registers the form category taxonomy.

Description

See also

Source

File: src/db-objects/taxonomy-manager.php

	protected function register_form_category_taxonomy() {
		$rewrite_slug = _x( 'form-categories', 'default form category rewrite slug', 'torro-forms' );

		$args = array(
			'labels'            => array(
				'name'                       => __( 'Categories', 'torro-forms' ),
				'singular_name'              => __( 'Category', 'torro-forms' ),
				'search_items'               => __( 'Search Categories', 'torro-forms' ),
				'popular_items'              => __( 'Popular Categories', 'torro-forms' ),
				'all_items'                  => __( 'All Categories', 'torro-forms' ),
				'parent_item'                => __( 'Parent Category', 'torro-forms' ),
				'parent_item_colon'          => __( 'Parent Category:', 'torro-forms' ),
				'edit_item'                  => __( 'Edit Category', 'torro-forms' ),
				'view_item'                  => __( 'View Category', 'torro-forms' ),
				'update_item'                => __( 'Update Category', 'torro-forms' ),
				'add_new_item'               => __( 'Add New Category', 'torro-forms' ),
				'new_item_name'              => __( 'New Category Name', 'torro-forms' ),
				'separate_items_with_commas' => __( 'Separate categories with commas', 'torro-forms' ),
				'add_or_remove_items'        => __( 'Add or remove categories', 'torro-forms' ),
				'choose_from_most_used'      => __( 'Choose from the most used categories', 'torro-forms' ),
				'not_found'                  => __( 'No categories found.', 'torro-forms' ),
				'no_terms'                   => __( 'No categories', 'torro-forms' ),
				'items_list_navigation'      => __( 'Categories list navigation', 'torro-forms' ),
				'items_list'                 => __( 'Categories list', 'torro-forms' ),
				'menu_name'                  => __( 'Categories', 'torro-forms' ),
			),
			'public'            => false,
			'show_ui'           => true,
			'hierarchical'      => true,
			'show_in_menu'      => true,
			'show_in_nav_menus' => false,
			'show_tagcloud'     => false,
			'show_admin_column' => true,
			'capabilities'      => array(
				'manage_terms' => 'manage_' . $this->get_prefix() . 'form_categories',
				'edit_terms'   => 'edit_' . $this->get_prefix() . 'form_categories',
				'delete_terms' => 'delete_' . $this->get_prefix() . 'form_categories',
				'assign_terms' => 'edit_' . $this->get_prefix() . 'forms',
			),
			'rewrite'           => array(
				'slug'       => $rewrite_slug,
				'with_front' => false,
				'ep_mask'    => EP_NONE,
			),
		);

		$args['object_type'] = array( $this->get_prefix() . 'form' );

		$this->register( $this->get_prefix() . 'form_category', $args );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.