WordPress开发者和主题制作者的搜索引擎



wp_rest_search_handlers ›

Since5.0.0
已弃用n/a
apply_filters( 'wp_rest_search_handlers', array( new WP_REST_Post_Search_Handler()
参数:
  • (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
定义在:
文档:

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





源码

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