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



post_search_columns › WordPress过滤钩子

Since6.2.0
已弃用n/a
› apply_filters( 'post_search_columns', $search_columns, $query_vars['s'], $this )
参数: (3)
  • () search_columns Array of column names to be searched.
    Required: Yes
  • () search Text being searched.
    Required: Yes
  • () query The current WP_Query instance.
    Required: Yes
定义在:
文档:

Filters the columns to search in a WP_Query search.

The supported columns are `post_title`, `post_excerpt` and `post_content`. They are all included by default.




源码

$search_columns = (array) apply_filters( 'post_search_columns', $search_columns, $query_vars['s'], $this );