PHP Класс EP_Sync_Manager

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

Открытые свойства

Свойство Тип Описание
$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