Skip to content

Commit

Permalink
Merge pull request #6 from WebDevStudios/add-query-order-filters
Browse files Browse the repository at this point in the history
Add filters for ordering
  • Loading branch information
coreymcollins committed Nov 27, 2018
2 parents 653cf2d + ae3f211 commit e6f0e88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion class-wds-react-post-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WDS React Post Search
* Description: Power up the basic WordPress search with React.
* Plugin URI: https://www.webdevstudios.com
* Version: 1.0.2
* Version: 1.0.3
*
* With help from:
* https://www.ibenic.com/wordpress-react-search/
Expand Down Expand Up @@ -391,6 +391,8 @@ public function search_posts( $request ) {
'post_type' => $this->get_valid_search_post_types( $request ),
's' => sanitize_text_field( $request['s'] ),
'tax_query' => apply_filters( 'wds_react_post_search_tax_query', array() ),
'order' => apply_filters( 'wds_react_post_search_order', 'DESC' ),
'orderby' => apply_filters( 'wds_react_post_search_orderby', 'date' ),
];

// Get posts.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wds-react-post-search",
"version": "1.0.2",
"version": "1.0.3",
"description": "Power up the basic WordPress search field with React.",
"main": "assets/js/public.js",
"dependencies": {
Expand Down

0 comments on commit e6f0e88

Please sign in to comment.