Tribe__Events__Aggregator__Record__Activity::exists( string $slug )
Checks if a given Activity type exists
Contents
Parameters
- $slug
-
(string) (Required) The Slug of the Tab
Return
(boolean)
Source
File: src/Tribe/Aggregator/Record/Activity.php
public function exists( $slug ) {
if ( is_null( $slug ) ) {
return false;
}
if ( ! isset( $this->map[ $slug ] ) ) {
return false;
}
// Map the Slug
$slug = $this->map[ $slug ];
// Check if it actually exists
return ! empty( $this->items[ $slug ] ) ;
}