create_noptin_task( array $args )
Creates and returns a new task object.
Description Description
Note that this does not run the task. You will have to manually run it.
See also See also
Parameters Parameters
- $args
(array) (Required) Required. A numerical array of task args. The first item is the name of the action while the other arguments will be passed to the action callbacks as parameters.
Return Return
Source Source
File: includes/functions.php
function create_noptin_task( array $args ) { // Create a new task. $task = new Noptin_Task( array_shift( $args ) ); // Maybe attach some params to the task. return $task->set_params( $args ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.2.7 | Introduced. |