|
|
@@ -44,7 +44,7 @@ add_action( 'rest_api_init', function () {
|
|
44
|
44
|
/**
|
|
45
|
45
|
* Craft in America custom sort_types
|
|
46
|
46
|
*/
|
|
47
|
|
- $artist_sorts = ['by_alpha', 'by_material'];
|
|
|
47
|
+ $artist_sorts = ['by_alpha', 'by_material', 'by_episode'];
|
|
48
|
48
|
foreach ($artist_sorts as $sort) {
|
|
49
|
49
|
$unsnaked = _unsnake($sort);
|
|
50
|
50
|
$sort_controller = new Make_Sort_By('artist', $sort);
|
|
|
@@ -60,6 +60,16 @@ add_action( 'rest_api_init', function () {
|
|
60
|
60
|
$sort_controller->register_custom_route("$date_type/$unsnaked");
|
|
61
|
61
|
}
|
|
62
|
62
|
}
|
|
|
63
|
+
|
|
|
64
|
+ $episode_sorts = ['by_episode'];
|
|
|
65
|
+ $episode_types = ['artist','exhibition', 'event'];
|
|
|
66
|
+ foreach ($episode_sorts as $sort) {
|
|
|
67
|
+ $unsnaked = _unsnake($sort);
|
|
|
68
|
+ foreach ($episode_types as $episode_type) {
|
|
|
69
|
+ $sort_controller = new Make_Sort_By($episode_type, $sort);
|
|
|
70
|
+ $sort_controller->register_custom_route("$episode_type/$unsnaked");
|
|
|
71
|
+ }
|
|
|
72
|
+ }
|
|
63
|
73
|
});
|
|
64
|
74
|
|
|
65
|
75
|
/**
|