PHP Class The_SEO_Framework\Search

Excludes pages from search based on options.
Since: 2.7.1
Inheritance: extends Generate_Ldjson
ファイルを表示 Open project: sybrew/the-seo-framework

Public Methods

Method Description
adjust_search_filter ( array $query ) : void Excludes posts from search with certain metadata.
get_excluded_search_ids ( ) : array Fetches posts with exclude_local_search option on
search_filter ( array $query ) : void Fetches posts with exclude_local_search option on.

Protected Methods

Method Description
__construct ( ) Constructor, loads parent constructor and adds filters.

Method Details

__construct() protected method

Constructor, loads parent constructor and adds filters.
protected __construct ( )

adjust_search_filter() public method

For now, it only looks at 'exclude_local_search'. If it exists, the post or page will be excluded from the local Search Results.
Since: 2.7.0
public adjust_search_filter ( array $query ) : void
$query array The possible search query.
return void Early if no search query is found.

get_excluded_search_ids() public method

Fetches posts with exclude_local_search option on
Since: 2.7.0
Since: 2.7.0 No longer used.
public get_excluded_search_ids ( ) : array
return array Excluded Post IDs

search_filter() public method

Fetches posts with exclude_local_search option on.
Since: 2.1.7
Since: 2.7.0 No longer used for performance reasons.
public search_filter ( array $query ) : void
$query array The possible search query.
return void Early if no search query is found.