PHP Class Wallmander\ElasticsearchIndexer\Controller\QueryIntegration

Author: Mikael Mattsson ([email protected])
Afficher le fichier Open project: wallmanderco/elasticsearch-indexer

Méthodes publiques

Méthode 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 méthode

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

actionLoopStart() public static méthode

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 méthode

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

actionThePost() public static méthode

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 méthode

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

filterPostsRequest() public static méthode

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

filterThePosts() public static méthode

public static filterThePosts ( array $posts, WP_Query $query ) : array
$posts array
$query WP_Query
Résultat array