Tribe__Events__REST__V1__Main::hook()
Hooks the filters and actions required for the REST API support to kick in.
Source
File: src/Tribe/REST/V1/Main.php
public function hook() {
$this->hook_headers();
$this->hook_settings();
$this->hook_messages();
/** @var Tribe__Events__REST__V1__System $system */
$system = tribe( 'tec.rest-v1.system' );
if ( ! $system->supports_tec_rest_api() || ! $system->tec_rest_api_is_enabled() ) {
return;
}
add_action( 'rest_api_init', array( $this, 'register_endpoints' ) );
add_filter( 'tribe_events_register_event_cat_type_args', array( $this, 'filter_taxonomy_args' ) );
}