Skip to content

Instantly share code, notes, and snippets.

View yaserrar's full-sized avatar
🏋️‍♂️
YAserrar

Aserrar Youssef yaserrar

🏋️‍♂️
YAserrar
View GitHub Profile
<?php
public function get_all_events( $request ) {
$terms = get_terms(array(
'taxonomy' => FAT_EVENT_LOCATION_TAXONOMY,
'hide_empty' => false
));
$locations = array();
<?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' ),
),
) );