site_search_columns WordPress Filter Hook

The site_search_columns hook is used to specify the columns that should be displayed in the search results page. This hook is used in conjunction with the site_search_results hook.

apply_filters( 'site_search_columns', string[] $search_columns, string $search, WP_Site_Query $query ) #

Filters the columns to search in a WP_Site_Query search.


Description

The default columns include ‘domain’ and ‘path.


Top ↑

Parameters

$search_columns

(string[])Array of column names to be searched.

$search

(string)Text being searched.

$query

(WP_Site_Query)The current WP_Site_Query instance.


Top ↑

Source

File: wp-includes/class-wp-site-query.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.