WP_Async_Task::prepare_data( array $data )
Description #
Prepare any data to be passed to the asynchronous postback
The array this function receives will be a numerically keyed array from func_get_args(). It is expected that you will return an associative array so that the $_POST values used in the asynchronous call will make sense.
The array you send back may or may not have anything to do with the data passed into this method. It all depends on the implementation details and what data is needed in the asynchronous postback.
Do not set values for ‘action’ or ‘_nonce’, as those will get overwritten later in launch().
Parameters #
- $dataarray (Required) The raw data received by the launch method
Source #
File: lib/class-wp-async-task.php
abstract protected function prepare_data( $data );
Expand full source code Collapse full source code View on GitHub: lib/class-wp-async-task.php:264
Add your comment