WP_Async_Task::launch()
Description #
Add the shutdown action for launching the real postback if we don’t get an exception thrown by prepare_data().
Source #
File: lib/class-wp-async-task.php
public function launch() { $data = func_get_args(); try { $data = $this->prepare_data( $data ); } catch ( Exception $e ) { return; } $data['action'] = "wp_async_$this->action"; $data['_nonce'] = $this->create_async_nonce(); $this->_body_data = $data; if ( ! has_action( 'shutdown', array( $this, 'launch_on_shutdown' ) ) ) { add_action( 'shutdown', array( $this, 'launch_on_shutdown' ) ); } }
Expand full source code Collapse full source code View on GitHub: lib/class-wp-async-task.php:101
Add your comment