A WordPress-centric search engine for devs and theme authors



wp_rest_search_handlers ›

Since5.0.0
Deprecatedn/a
apply_filters( 'wp_rest_search_handlers', array( new WP_REST_Post_Search_Handler()
Parameters:
  • (array) $search_handlers List of search handlers to use in the controller. Each search handler instance must extend the `WP_REST_Search_Handler` class. Default is only a handler for posts.
    Required: Yes
Defined at:
Codex:

Filters the search handlers to use in the REST search controller.





Source

$search_handlers = apply_filters( 'wp_rest_search_handlers', array( new WP_REST_Post_Search_Handler() ) );