Tribe__Events__Validator__Base::is_event_slug( string $event_slug )

Whether the value is the post name of an existing event or not.


Parameters

$event_slug

(string) (Required)


Top ↑

Return

(bool)


Top ↑

Source

File: src/Tribe/Validator/Base.php

	public function is_event_slug( $event_slug ) {
		if ( empty( $event_slug ) ) {
			return false;
		}

		$event = get_page_by_path( $event_slug, OBJECT, Tribe__Events__Main::POSTTYPE );

		return ! empty( $event ) && Tribe__Events__Main::POSTTYPE === $event->post_type;
	}

Top ↑

Changelog

Changelog
Version Description
4.6.8 Introduced.