PHP 클래스 EP_WP_Query_Integration

파일 보기 프로젝트 열기: 10up/elasticpress 1 사용 예제들

공개 메소드들

메소드 설명
__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 ( )