PHP Class EP_Sync_Manager

Afficher le fichier Open project: 10up/elasticpress Class Usage Examples

Méthodes publiques

Свойство Type Description
$sync_post_queue array Save posts for indexing later

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

Placeholder method
Since: 0.1.0
public __construct ( )

action_delete_blog_from_index() public méthode

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() public méthode

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

action_index_sync_queue() public méthode

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

action_queue_meta_sync() public méthode

When whitelisted meta is updated, queue the post for reindex
Since: 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() public méthode

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

destroy() public méthode

Remove actions and filters
Since: 1.4
public destroy ( )

factory() public static méthode

Return a singleton instance of the current class
Since: 0.1.0
public static factory ( ) : EP_Sync_Manager
Résultat EP_Sync_Manager

setup() public méthode

Setup actions and filters
Since: 0.1.2
public setup ( )

sync_post() public méthode

Sync a post for a specific site or globally.
Since: 0.1.0
public sync_post ( integer $post_id, boolean $blocking = true ) : boolean | array
$post_id integer
$blocking boolean
Résultat boolean | array

Property Details

$sync_post_queue public_oe property

Save posts for indexing later
Since: 2.0
public array $sync_post_queue
Résultat array