balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

TaxonomyController.php (511B)


      1 <?php
      2 /**
      3  * Controls Taxonomies
      4  */
      5 
      6 namespace Extendify\ExtendifySdk\Controllers;
      7 
      8 use Extendify\ExtendifySdk\Http;
      9 
     10 if (!defined('ABSPATH')) {
     11     die('No direct access.');
     12 }
     13 
     14 /**
     15  * The controller for dealing with taxonomies
     16  */
     17 class TaxonomyController
     18 {
     19 
     20     /**
     21      * Return all taxonomies
     22      *
     23      * @return WP_REST_Response|WP_Error
     24      */
     25     public static function index()
     26     {
     27         $response = Http::get('/airtable-taxonomies', []);
     28         return new \WP_REST_Response($response);
     29     }
     30 }