Hook extends Component

Implements integration with WordPress hooks.

Table of Contents

__construct()  : mixed
Class constructor.
start_import()  : mixed
Starts import.
update_comment()  : mixed
Updates comment.
update_comment_meta()  : mixed
Updates comment meta.
update_comment_status()  : mixed
Updates comment status.
update_post()  : mixed
Updates post.
update_post_meta()  : mixed
Updates post meta.
update_post_status()  : mixed
Updates post status.
update_post_terms()  : mixed
Updates post terms.
update_term()  : mixed
Updates term.
update_term_meta()  : mixed
Updates term meta.
update_user()  : mixed
Updates user.
update_user_meta()  : mixed
Updates user meta.
boot()  : mixed
Bootstraps component properties.
is_import_started()  : bool
Checks if import started.
set_callbacks()  : mixed
Sets the action and filter callbacks.
set_property()  : mixed
Sets a property value.

Methods

__construct()

Class constructor.

public __construct([array<string|int, mixed> $args = [] ]) : mixed
Parameters
$args : array<string|int, mixed> = []

Component arguments.

Return values
mixed

update_comment()

Updates comment.

public update_comment(int $comment_id) : mixed
Parameters
$comment_id : int

Comment ID.

Return values
mixed

update_comment_meta()

Updates comment meta.

public update_comment_meta(int $meta_id, int $comment_id, string $meta_key, string $meta_value) : mixed
Parameters
$meta_id : int

Meta ID.

$comment_id : int

Comment ID.

$meta_key : string

Meta key.

$meta_value : string

Meta value.

Return values
mixed

update_comment_status()

Updates comment status.

public update_comment_status(int $comment_id, string $new_status) : mixed
Parameters
$comment_id : int

Comment ID.

$new_status : string

New status.

Return values
mixed

update_post()

Updates post.

public update_post(int $post_id[, mixed $post = null ][, bool $update = false ]) : mixed
Parameters
$post_id : int

Post ID.

$post : mixed = null

Post object.

$update : bool = false

Is post updated?

Return values
mixed

update_post_meta()

Updates post meta.

public update_post_meta(int $meta_id, int $post_id, string $meta_key, string $meta_value) : mixed
Parameters
$meta_id : int

Meta ID.

$post_id : int

Post ID.

$meta_key : string

Meta key.

$meta_value : string

Meta value.

Return values
mixed

update_post_status()

Updates post status.

public update_post_status(string $new_status, string $old_status, WP_Post $post) : mixed
Parameters
$new_status : string

New status.

$old_status : string

Old status.

$post : WP_Post

Post object.

Return values
mixed

update_post_terms()

Updates post terms.

public update_post_terms(int $post_id, array<string|int, mixed> $terms, array<string|int, mixed> $term_taxonomy_ids, string $taxonomy, bool $append, array<string|int, mixed> $old_term_taxonomy_ids) : mixed
Parameters
$post_id : int

Post ID.

$terms : array<string|int, mixed>

Terms.

$term_taxonomy_ids : array<string|int, mixed>

Term taxonomy IDs.

$taxonomy : string

Taxonomy name.

$append : bool

Append property.

$old_term_taxonomy_ids : array<string|int, mixed>

Old term taxonomy IDs.

Return values
mixed

update_term()

Updates term.

public update_term(int $term_id, int $term_taxonomy_id[, string $taxonomy = null ]) : mixed
Parameters
$term_id : int

Term ID.

$term_taxonomy_id : int

Term taxonomy ID.

$taxonomy : string = null

Taxonomy name.

Return values
mixed

update_term_meta()

Updates term meta.

public update_term_meta(int $meta_id, int $term_id, string $meta_key, string $meta_value) : mixed
Parameters
$meta_id : int

Meta ID.

$term_id : int

Term ID.

$meta_key : string

Meta key.

$meta_value : string

Meta value.

Return values
mixed

update_user()

Updates user.

public update_user(int $user_id) : mixed
Parameters
$user_id : int

User ID.

Return values
mixed

update_user_meta()

Updates user meta.

public update_user_meta(int $meta_id, int $user_id, string $meta_key, string $meta_value) : mixed
Parameters
$meta_id : int

Meta ID.

$user_id : int

User ID.

$meta_key : string

Meta key.

$meta_value : string

Meta value.

Return values
mixed

set_callbacks()

Sets the action and filter callbacks.

protected final set_callbacks(array<string|int, mixed> $callbacks) : mixed
Parameters
$callbacks : array<string|int, mixed>

Callback arguments.

Return values
mixed

set_property()

Sets a property value.

protected final set_property(string $name, mixed $value[, string $prefix = '' ]) : mixed
Parameters
$name : string

Property name.

$value : mixed

Property value.

$prefix : string = ''

Method prefix.

Return values
mixed