Tribe__Events__Pro__Main::filter_add_routes( Tribe__Events__Rewrite $rewrite )

Add rewrite routes for custom PRO stuff and views.


Parameters

$rewrite

(Tribe__Events__Rewrite) (Required) The Tribe__Events__Rewrite object


Top ↑

Return

(void)


Top ↑

Source

File: src/Tribe/Main.php

		public function filter_add_routes( $rewrite ) {
			$rewrite
				->single( array( '(\d{4}-\d{2}-\d{2})' ), array( Tribe__Events__Main::POSTTYPE => '%1', 'eventDate' => '%2' ) )
				->single( array( '(\d{4}-\d{2}-\d{2})', '(feed|rdf|rss|rss2|atom)' ), array( Tribe__Events__Main::POSTTYPE => '%1', 'eventDate' => '%2', 'feed' => '%3' ) )
				->single( array( '(\d{4}-\d{2}-\d{2})', '(\d+)', '(feed|rdf|rss|rss2|atom)' ), array( Tribe__Events__Main::POSTTYPE => '%1', 'eventDate' => '%2', 'eventSequence' => '%3', 'feed' => '%4' ) )
				->single( array( '(\d{4}-\d{2}-\d{2})', '(\d+)' ), array( Tribe__Events__Main::POSTTYPE => '%1', 'eventDate' => '%2', 'eventSequence' => '%3' ) )
				->single( array( '(\d{4}-\d{2}-\d{2})', 'embed' ), array( Tribe__Events__Main::POSTTYPE => '%1', 'eventDate' => '%2', 'embed' => 1 ) )
				->single( array( '{{ all }}' ), array( Tribe__Events__Main::POSTTYPE => '%1', 'post_type' => Tribe__Events__Main::POSTTYPE, 'eventDisplay' => 'all', 'tribe_recurrence_list' => true ) )
				->single( array( '(\d{4}-\d{2}-\d{2})', 'ical' ), array( Tribe__Events__Main::POSTTYPE => '%1', 'eventDate' => '%2', 'ical' => 1 ) )

				->archive( array( '{{ week }}' ), array( 'eventDisplay' => 'week' ) )
				->archive( array( '{{ week }}', '{{ featured }}' ), array( 'eventDisplay' => 'week', 'featured' => true ) )
				->archive( array( '{{ week }}', '(\d{2})' ), array( 'eventDisplay' => 'week', 'eventDate' => '%1' ) )
				->archive( array( '{{ week }}', '(\d{2})', '{{ featured }}' ), array( 'eventDisplay' => 'week', 'eventDate' => '%1', 'featured' => true ) )
				->archive( array( '{{ week }}', '(\d{4}-\d{2}-\d{2})' ), array( 'eventDisplay' => 'week', 'eventDate' => '%1' ) )
				->archive( array( '{{ week }}', '(\d{4}-\d{2}-\d{2})', '{{ featured }}' ), array( 'eventDisplay' => 'week', 'eventDate' => '%1', 'featured' => true ) )

				->tax( array( '{{ week }}' ), array( 'eventDisplay' => 'week' ) )
				->tax( array( '{{ week }}', '{{ featured }}' ), array( 'eventDisplay' => 'week', 'featured' => true ) )
				->tax( array( '{{ week }}', '(\d{4}-\d{2}-\d{2})' ), array( 'eventDisplay' => 'week', 'eventDate' => '%2' ) )
				->tax( array( '{{ week }}', '(\d{4}-\d{2}-\d{2})', '{{ featured }}' ), array( 'eventDisplay' => 'week', 'eventDate' => '%2', 'featured' => true ) )

				->tag( array( '{{ week }}' ), array( 'eventDisplay' => 'week' ) )
				->tag( array( '{{ week }}', '{{ featured }}' ), array( 'eventDisplay' => 'week', 'featured' => true ) )
				->tag( array( '{{ week }}', '(\d{4}-\d{2}-\d{2})' ), array( 'eventDisplay' => 'week', 'eventDate' => '%2' ) )
				->tag( array( '{{ week }}', '(\d{4}-\d{2}-\d{2})', '{{ featured }}' ), array( 'eventDisplay' => 'week', 'eventDate' => '%2', 'featured' => true ) )

				->archive( array( '{{ photo }}' ), array( 'eventDisplay' => 'photo' ) )
				->archive( array( '{{ photo }}', '{{ featured }}' ), array( 'eventDisplay' => 'photo', 'featured' => true ) )
				->archive( array( '{{ photo }}', '(\d{4}-\d{2}-\d{2})' ), array( 'eventDisplay' => 'photo', 'eventDate' => '%1' ) )
				->archive( array( '{{ photo }}', '(\d{4}-\d{2}-\d{2})', '{{ featured }}' ), array( 'eventDisplay' => 'photo', 'eventDate' => '%1', 'featured' => true ) )

				->tax( array( '{{ photo }}' ), array( 'eventDisplay' => 'photo' ) )
				->tax( array( '{{ photo }}', '{{ featured }}' ), array( 'eventDisplay' => 'photo', 'featured' => true ) )
				->tag( array( '{{ photo }}' ), array( 'eventDisplay' => 'photo' ) )
				->tag( array( '{{ photo }}', '{{ featured }}' ), array( 'eventDisplay' => 'photo', 'featured' => true ) );
		}