Inventory_Presser_Taxonomies::register_taxonomies()

Registers all our custom taxonomies


Return Return

(void)


Top ↑

Source Source

File: includes/class-taxonomies.php

	public static function register_taxonomies() {
		// loop over this data, register the taxonomies, and populate the terms if needed.
		$taxonomy_data = self::taxonomy_data();
		$count         = count( $taxonomy_data );
		for ( $i = 0; $i < $count; $i++ ) {
			// create the taxonomy, replace hyphens with underscores.
			$taxonomy_name = str_replace( '-', '_', $taxonomy_data[ $i ]['args']['query_var'] );
			register_taxonomy( $taxonomy_name, INVP::POST_TYPE, $taxonomy_data[ $i ]['args'] );
		}
	}