Tribe__Events__Rewrite::tax( array|string $regex, array $args = array() )

Alias to $this->add() but adding the taxonomy base first


Parameters

$regex

(array|string) (Required) The regular expression to catch the URL

$args

(array) (Optional) The arguments in which the regular expression "alias" to

Default value: array()


Top ↑

Return

(Tribe__Events__Rewrite)


Top ↑

Source

File: src/Tribe/Rewrite.php

	public function tax( $regex, $args = array() ) {
		$default = array(
			'post_type' => Tribe__Events__Main::POSTTYPE,
			Tribe__Events__Main::TAXONOMY => '%1',
		);
		$args = array_filter( wp_parse_args( $args, $default ) );
		$regex = array_merge( array( $this->bases->archive, $this->bases->tax, '(?:[^/]+/)*([^/]+)' ), (array) $regex );

		return $this->add( $regex, $args );
	}