PHP Класс EP_WP_Query_Integration

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( ) Placeholder method
action_loop_end ( $query ) Make sure the correct blog is restored
action_loop_start ( $query ) Ensure we've started a loop before we allow ourselves to change the blog
action_pre_get_posts ( $query ) Disables cache_results, adds header.
action_the_post ( array $post ) Switch to the correct site if the post site id is different than the actual one
factory ( ) : object Return a singleton instance of the current class
filter_found_posts_query ( string $sql, object $query ) : string Remove the found_rows from the SQL Query
filter_posts_request ( string $request, object $query ) : string Filter query string used for get_posts(). Query for posts and save for later.
filter_the_posts ( array $posts, &$query ) : array Filter the posts array to contain ES query results in EP_Post form. Pull previously queried posts.
setup ( ) Checks to see if we should be integrating and if so, sets up the appropriate actions and filters.

Описание методов

__construct() публичный Метод

Placeholder method
С версии: 0.9
public __construct ( )

action_loop_end() публичный Метод

Make sure the correct blog is restored
С версии: 0.9
public action_loop_end ( $query )

action_loop_start() публичный Метод

Ensure we've started a loop before we allow ourselves to change the blog
С версии: 0.9.2
public action_loop_start ( $query )

action_pre_get_posts() публичный Метод

Disables cache_results, adds header.
С версии: 0.9
public action_pre_get_posts ( $query )
$query

action_the_post() публичный Метод

Switch to the correct site if the post site id is different than the actual one
С версии: 0.9
public action_the_post ( array $post )
$post array

factory() публичный статический Метод

Return a singleton instance of the current class
С версии: 0.9
public static factory ( ) : object
Результат object

filter_found_posts_query() публичный Метод

Remove the found_rows from the SQL Query
С версии: 0.9
public filter_found_posts_query ( string $sql, object $query ) : string
$sql string
$query object
Результат string

filter_posts_request() публичный Метод

Return a query that will return nothing.
С версии: 0.9
public filter_posts_request ( string $request, object $query ) : string
$request string
$query object
Результат string

filter_the_posts() публичный Метод

Filter the posts array to contain ES query results in EP_Post form. Pull previously queried posts.
public filter_the_posts ( array $posts, &$query ) : array
$posts array
Результат array

setup() публичный Метод

Checks to see if we should be integrating and if so, sets up the appropriate actions and filters.
С версии: 0.9
public setup ( )