Filter hook 'post_search_columns'
in WP Core File wp-includes/class-wp-query.php at line 1444
Description
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.
Occurrences
Filename |
Line Number |
wp-includes/class-wp-query.php |
1444 |
Parameters
Type |
Name |
Description |
string[] |
$search_columns |
Array of column names to be searched. |
string |
$search |
Text being searched. |
WP_Query |
$query |
The current WP_Query instance. |
PHP Doc
/**
* 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.
*
* @since 6.2.0
*
* @param string[] $search_columns Array of column names to be searched.
* @param string $search Text being searched.
* @param WP_Query $query The current WP_Query instance.
*/