Skip to content

Commit

Permalink
hardcoded tab categories
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenCappuccino committed Oct 3, 2021
1 parent 484b607 commit c66371a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion wp-ct-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Central Times REST API
Plugin URI: https://github.com/CentralTimes/wp_ct_rest_api
Description: A WordPress plugin designed to modify the REST API to include data present in the Central Times SNO FLEX installation. Used by Central Times for its mobile app.
Version: 0.6.0
Version: 0.7.0
Author: Central Times
Author URI: https://github.com/CentralTimes
License: MIT
Expand All @@ -20,6 +20,22 @@
},
));

// Hardcoded list of mobile categories
register_rest_route('centraltimes/v1', '/tab-categories', array(
'methods' => 'GET',
'callback' => function () {
return array(
array("name" => "News", "id" => 6),
array("name" => "Community", "id" => 148),
array("name" => "Profiles", "id" => 8),
array("name" => "Features", "id" => 9),
array("name" => "Entertainment", "id" => 14),
array("name" => "Sports", "id" => 11),
array("name" => "Opinions", "id" => 15)
);
},
));

// Register list of NextGEN images for gallery
register_rest_route('centraltimes/v1', '/ngg-gallery/(?P<id>\d+)', array(
'methods' => 'GET',
Expand Down

0 comments on commit c66371a

Please sign in to comment.