-
-
Save searchwpgists/7843f40e28b458bdf629802bddcfec4a to your computer and use it in GitHub Desktop.
Customize the SearchWP Query arguments used for REST requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// @link https://searchwp.com/documentation/rest-api/ | |
// Customize the SearchWP Query arguments used for REST requests. | |
add_filter( 'searchwp\rest\args', function( $args, $params ) { | |
// $args are sent to \SWP_Query after this. | |
// @link https://searchwp.com/documentation/classes/swp_query/ | |
return $args; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment