\ActionScheduler_CanceledAction

Class ActionScheduler_CanceledAction

Stored action which was canceled and therefore acts like a finished action but should always return a null schedule, regardless of schedule passed to its constructor.

Summary

Methods
Properties
Constants
execute()
is_finished()
__construct()
get_hook()
get_schedule()
get_args()
get_group()
set_priority()
get_priority()
No public properties found
No constants found
set_hook()
set_schedule()
set_args()
set_group()
$hook
$args
$schedule
$group
$priority
N/A
No private methods found
No private properties found
N/A

Properties

$hook

$hook : string

Action's hook.

Type

normal

$args

$args : array<string,mixed>

Action's args.

Type

normal

$schedule

$schedule : \ActionScheduler_Schedule

Action's schedule.

Type

normal

$group

$group : string

Action's group.

Type

normal

$priority

$priority : int

Priorities are conceptually similar to those used for regular WordPress actions.

Like those, a lower priority takes precedence over a higher priority and the default is 10.

Unlike regular WordPress actions, the priority of a scheduled action is strictly an integer and should be kept within the bounds 0-255 (anything outside the bounds will be brought back into the acceptable range).

Type

normal

Methods

execute()

execute() : mixed

Executes the action.

If no callbacks are registered, an exception will be thrown and the action will not be fired. This is useful to help detect cases where the code responsible for setting up a scheduled action no longer exists.

Throws

\Exception

If no callbacks are registered for this action.

Returns

mixed

is_finished()

is_finished() : bool

Action has not finished.

Returns

bool

__construct()

__construct(string  $hook, array  $args = array(), null|\ActionScheduler_Schedule  $schedule = null, string  $group = '') : mixed

Construct.

Parameters

string $hook

Action's hook.

array $args

Action's arguments.

null|\ActionScheduler_Schedule $schedule

Action's schedule.

string $group

Action's group.

Returns

mixed

get_hook()

get_hook() : mixed

Get action's hook.

Returns

mixed

get_schedule()

get_schedule() : \ActionScheduler_Schedule

Action's schedule.

Returns

\ActionScheduler_Schedule

get_args()

get_args() : mixed

Get action's args.

Returns

mixed

get_group()

get_group() : string

Action's group.

Returns

string

set_priority()

set_priority(int  $priority) : void

Sets the priority of the action.

Parameters

int $priority

Priority level (lower is higher priority). Should be in the range 0-255.

get_priority()

get_priority() : int

Gets the action priority.

Returns

int

set_hook()

set_hook(string  $hook) : mixed

Set action's hook.

Parameters

string $hook

Action's hook.

Returns

mixed

set_schedule()

set_schedule(\ActionScheduler_Schedule  $schedule) : mixed

Set action's schedule.

Parameters

\ActionScheduler_Schedule $schedule

Action's schedule.

Returns

mixed

set_args()

set_args(array  $args) : mixed

Set action's args.

Parameters

array $args

Action's arguments.

Returns

mixed

set_group()

set_group(string  $group) : mixed

Section action's group.

Parameters

string $group

Action's group.

Returns

mixed