Tribe__Events__Aggregator__Settings::match_source_origin( string $source )

Matches which other origin this source url might be


Parameters

$source

(string) (Required) Which source we are testing against


Top ↑

Return

(string|bool)


Top ↑

Source

File: src/Tribe/Aggregator/Settings.php

	public function match_source_origin( $source ) {
		$origins = $this->get_source_origin_regexp();

		if ( ! is_string( $source  ) ) {
			return false;
		}

		foreach ( $origins as $origin => $regexp ) {
			// Skip if we don't match the source to any of the URLs
			if ( ! preg_match( '/' . $regexp . '/', $source ) ) {
				continue;
			}

			return $origin;
		}

		return false;
	}

Top ↑

Changelog

Changelog
Version Description
4.6.18 Introduced.