diff --git a/src/classes/api/class-tainacan-rest-controller.php b/src/classes/api/class-tainacan-rest-controller.php index 59f61fdf6..fc760ee5a 100644 --- a/src/classes/api/class-tainacan-rest-controller.php +++ b/src/classes/api/class-tainacan-rest-controller.php @@ -69,6 +69,7 @@ class REST_Controller extends \WP_REST_Controller { 'authorid' => 'author', 'authorname' => 'author_name', 'search' => 's', + 's' => 's', 'searchterm' => 'search', 'status' => 'post_status', 'offset' => 'offset', diff --git a/src/views/admin/js/store/modules/collection/actions.js b/src/views/admin/js/store/modules/collection/actions.js index f69c6fb6a..e0e561253 100644 --- a/src/views/admin/js/store/modules/collection/actions.js +++ b/src/views/admin/js/store/modules/collection/actions.js @@ -38,6 +38,9 @@ export const fetchItems = ({ rootGetters, dispatch, commit }, { collectionId, is if (postQueries.advancedSearch) advancedSearchResults = postQueries.advancedSearch; } + if (postQueries.s != undefined && postQueries.s != null) + postQueries.search = postQueries.s; + let query = qs.stringify(postQueries); // Guarantees at least empty fetch_only are passed in case none is found