PHP 클래스 EP_Sync_Manager

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

공개 프로퍼티들

프로퍼티 타입 설명
$sync_post_queue array Save posts for indexing later

공개 메소드들

메소드 설명
__construct ( ) Placeholder method
action_delete_blog_from_index ( $blog_id ) Remove blog from index when a site is deleted, archived, or deactivated
action_delete_post ( integer $post_id ) Delete ES post when WP post is deleted
action_index_sync_queue ( ) Sync queued posts on shutdown. We do this in case a post is updated multiple times.
action_queue_meta_sync ( integer $meta_id, integer $object_id, string $meta_key, string $meta_value ) When whitelisted meta is updated, queue the post for reindex
action_sync_on_update ( $post_ID ) Sync ES index with what happened to the post being saved
destroy ( ) Remove actions and filters
factory ( ) : EP_Sync_Manager Return a singleton instance of the current class
setup ( ) Setup actions and filters
sync_post ( integer $post_id, boolean $blocking = true ) : boolean | array Sync a post for a specific site or globally.

메소드 상세

__construct() 공개 메소드

Placeholder method
부터: 0.1.0
public __construct ( )

action_delete_blog_from_index() 공개 메소드

Remove blog from index when a site is deleted, archived, or deactivated
public action_delete_blog_from_index ( $blog_id )
$blog_id

action_delete_post() 공개 메소드

Delete ES post when WP post is deleted
부터: 0.1.0
public action_delete_post ( integer $post_id )
$post_id integer

action_index_sync_queue() 공개 메소드

Sync queued posts on shutdown. We do this in case a post is updated multiple times.
부터: 2.0

action_queue_meta_sync() 공개 메소드

When whitelisted meta is updated, queue the post for reindex
부터: 2.0
public action_queue_meta_sync ( integer $meta_id, integer $object_id, string $meta_key, string $meta_value )
$meta_id integer
$object_id integer
$meta_key string
$meta_value string

action_sync_on_update() 공개 메소드

Sync ES index with what happened to the post being saved
부터: 0.1.0
public action_sync_on_update ( $post_ID )
$post_ID

destroy() 공개 메소드

Remove actions and filters
부터: 1.4
public destroy ( )

factory() 공개 정적인 메소드

Return a singleton instance of the current class
부터: 0.1.0
public static factory ( ) : EP_Sync_Manager
리턴 EP_Sync_Manager

setup() 공개 메소드

Setup actions and filters
부터: 0.1.2
public setup ( )

sync_post() 공개 메소드

Sync a post for a specific site or globally.
부터: 0.1.0
public sync_post ( integer $post_id, boolean $blocking = true ) : boolean | array
$post_id integer
$blocking boolean
리턴 boolean | array

프로퍼티 상세

$sync_post_queue 공개적으로 프로퍼티

Save posts for indexing later
부터: 2.0
public array $sync_post_queue
리턴 array