Makes sure that api accepts s as a search param. #428
This commit is contained in:
parent
8e070faae2
commit
b1128f1229
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue