This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
register_rest_route( $this->namespace, '/get_all_events_ccis', array( | |
// Notice how we are registering multiple endpoints the 'schema' equates to an OPTIONS request. | |
array( | |
'methods' => 'GET', | |
'callback' => array( $this, 'get_all_events_ccis' ), | |
), | |
) ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function get_all_events( $request ) { | |
$terms = get_terms(array( | |
'taxonomy' => FAT_EVENT_LOCATION_TAXONOMY, | |
'hide_empty' => false | |
)); | |
$locations = array(); | |