Created
January 15, 2021 12:41
-
-
Save jchristopher/ac7474d11d9c2bcef3291f137aa48244 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 | |
// 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