PHP Class Wallmander\ElasticsearchIndexer\Controller\QueryIntegration

Author: Mikael Mattsson ([email protected])
Mostra file Open project: wallmanderco/elasticsearch-indexer

Public Methods

Method Description
actionLoopEnd ( WP_Query $query ) Make sure the correct blog is restored.
actionLoopStart ( WP_Query $query ) Ensure we've started a loop before we allow ourselves to change the blog.
actionPreGetPosts ( WP_Query $query ) Disables cache_results, adds header.
actionThePost ( array $post ) Switch to the correct site if the post site id is different than the actual one.
filterFoundPostsQuery ( string $sql, WP_Query $query ) : string Remove the found_rows from the SQL Query.
filterPostsRequest ( string $request, WP_Query $query ) : string Filter query string used for get_posts(). Search for posts and save for later.
filterThePosts ( array $posts, WP_Query $query ) : array

Method Details

actionLoopEnd() public static method

Make sure the correct blog is restored.
public static actionLoopEnd ( WP_Query $query )
$query WP_Query

actionLoopStart() public static method

Ensure we've started a loop before we allow ourselves to change the blog.
public static actionLoopStart ( WP_Query $query )
$query WP_Query

actionPreGetPosts() public static method

Disables cache_results, adds header.
public static actionPreGetPosts ( WP_Query $query )
$query WP_Query

actionThePost() public static method

Switch to the correct site if the post site id is different than the actual one.
public static actionThePost ( array $post )
$post array

filterFoundPostsQuery() public static method

Remove the found_rows from the SQL Query.
public static filterFoundPostsQuery ( string $sql, WP_Query $query ) : string
$sql string
$query WP_Query
return string

filterPostsRequest() public static method

Return a query that will return nothing.
public static filterPostsRequest ( string $request, WP_Query $query ) : string
$request string
$query WP_Query
return string

filterThePosts() public static method

public static filterThePosts ( array $posts, WP_Query $query ) : array
$posts array
$query WP_Query
return array