Tribe__Events__Validator__Base::is_venue_slug( string $venue_slug )
Whether the value is the post name of an existing venue or not.
Contents
Parameters
- $venue_slug
-
(string) (Required)
Return
(bool)
Source
File: src/Tribe/Validator/Base.php
public function is_venue_slug( $venue_slug ) {
if ( empty( $venue_slug ) ) {
return false;
}
$venue = get_page_by_path( $venue_slug, OBJECT, Tribe__Events__Venue::POSTTYPE );
return ! empty( $venue ) && Tribe__Events__Venue::POSTTYPE === $venue->post_type;
}
Changelog
| Version | Description |
|---|---|
| 4.6.9 | Introduced. |