pre_as_enqueue_async_action - joedolson/my-calendar GitHub Wiki
Provides an opportunity to short-circuit the default process for enqueuing async actions.
Returning a value other than null from the filter will short-circuit the normal process. The expectation in such a scenario is that callbacks will return an integer representing the enqueued action ID (enqueued using some alternative process) or else zero.
Auto-generated Example
add_filter(
'pre_as_enqueue_async_action',
function(
int $pre_option = null,
string $hook,
array $args,
string $group,
int $priority,
bool $unique
) {
// Your code here.
return null;
},
10,
6
);
Parameters
int|null$pre_optionThe value to return instead of the option value.string$hookAction hook.array$argsAction arguments.string$groupAction group.int$priorityAction priority.bool$uniqueUnique action.
Files
apply_filters( 'pre_as_enqueue_async_action', null, $hook, $args, $group, $priority, $unique )