Hooks::filter_events_rewrite_rules_custom( TribeEventsProViewsV2array $rewrite_rules )

Filters The Events Calendar custom rewrite rules to fix the order and relative position of some and play nice with Views v2 canonical URL needs.


Parameters #

$rewrite_rules

(<span class="TribeEventsProViewsV2array">TribeEventsProViewsV2array) (Required) An array of The Events Calendar custom rewrite rules, in the same format used by WordPress: a map of each rule regular expression to the corresponding query string.


Top ↑

Return #

(TribeEventsProViewsV2array<string,string>) The input map of The Events Calendar rewrite rules, updated to satisfy the needs of Views v2 canonical URL building.


Top ↑

Source #

File: src/Tribe/Views/V2/Hooks.php

	public function filter_events_rewrite_rules_custom( $rewrite_rules ) {
		if ( ! is_array( $rewrite_rules ) ) {
			return $rewrite_rules;
		}

		return $this->container->make( Rewrite::class )->filter_events_rewrite_rules_custom( $rewrite_rules );
	}

Top ↑

Changelog #

Changelog
Version Description
5.0.3 Introduced.