Properties

$sync_conditions

$sync_conditions

$sync_options

$sync_options

$post_transitions

$post_transitions

$comment_transitions

$comment_transitions

$sync

$sync

Methods

__construct()

__construct()

sync_posts()

sync_posts(string $file, array $settings)

Parameters

string $file

FILE

array $settings

sync_comments()

sync_comments(string $file, array $settings)

Parameters

string $file

FILE

array $settings

sync_options()

sync_options(string $file, string $option)

Parameters

string $file

FILE

string $option

...

register()

register(string $object, int $id, array $settings)

Create a sync object/request

Parameters

string $object

Type of object to sync -- [ post | comment | option ]

int $id

Unique identifier

array $settings

get_common_sync_data()

get_common_sync_data()

sync()

sync()

Set up all the data and queue it for the outgoing XML-RPC request

get_content()

get_content( $content_ids)

Format and return content data from a direct xmlrpc request for it.

Parameters

$content_ids

register_post()

register_post(int $id, array $settings)

Helper method for registering a post for sync

Parameters

int $id

wp_posts.ID

array $settings

Sync data

register_comment()

register_comment(int $id, array $settings)

Helper method for registering a comment for sync

Parameters

int $id

wp_comments.comment_ID

array $settings

Sync data

posts()

posts( $file, array $settings)

Parameters

$file
array $settings

delete_post_action()

delete_post_action( $post_id)

Parameters

$post_id

transition_post_status_action()

transition_post_status_action( $new_status,  $old_status,  $post)

Parameters

$new_status
$old_status
$post

get_post_sync_operation()

get_post_sync_operation( $new_status,  $old_status,  $post,  $module_conditions)

Parameters

$new_status
$old_status
$post
$module_conditions

get_post()

get_post(int $id) : Array

Get a post and associated data in the standard JP format.

Cannot be called statically

Parameters

int $id

Post ID

Returns

Array —

containing full post details

is_post_public()

is_post_public(array $post) : bool

Decide whether a post/page/attachment is visible to the public.

Parameters

array $post

Returns

bool

comments()

comments( $file, array $settings)

Parameters

$file
array $settings

edit_comment_action()

edit_comment_action( $comment_id)

Parameters

$comment_id

wp_insert_comment_action()

wp_insert_comment_action( $comment_id,  $comment)

Parameters

$comment_id
$comment

transition_comment_status_for_comments_whose_status_does_not_change()

transition_comment_status_for_comments_whose_status_does_not_change( $comment_id,  $comment)

Parameters

$comment_id
$comment

translate_comment_status()

translate_comment_status( $status)

Parameters

$status

transition_comment_status_action()

transition_comment_status_action( $new_status,  $old_status,  $comment)

Parameters

$new_status
$old_status
$comment

get_comment()

get_comment(int $id) : Array

Get a comment and associated data in the standard JP format.

Cannot be called statically

Parameters

int $id

Comment ID

Returns

Array —

containing full comment details

options()

options( $file,  $option)

Parameters

$file
$option

deleted_option_action()

deleted_option_action( $option)

Parameters

$option

updated_option_action()

updated_option_action( $old_value)

Parameters

$old_value

added_option_action()

added_option_action( $option)

Parameters

$option

sync_all_module_options()

sync_all_module_options( $module_slug)

Parameters

$module_slug

sync_all_registered_options()

sync_all_registered_options( $options)

Parameters

$options

reindex_trigger()

reindex_trigger()

reindex_status()

reindex_status()

reindex_ui()

reindex_ui()