supports_wp_rest_api(); } /** * Whether The Events Calendar REST API is enabled or not for the WP installation. * * @return bool */ public function tec_rest_api_is_enabled() { $enabled = $this->supports_tec_rest_api() && false == tribe_get_option( self::$disable_option_name ); /** * Filters whether TEC REST API is enabled or not for the WP installation. * * @param bool $enabled */ return apply_filters( 'tribe_events_rest_api_enabled', $enabled ); } /** * Returns the name of the option used to indicate whether TEC REST API is enabled or not for * the WP installation. * * The option is stored in The Events Calendar options database record: use `tribe_get_option()` * to get it. * * @return string */ public static function get_disable_option_name() { return self::$disable_option_name; } }