Tribe__Process__Handler::maybe_handle( array|null $data_source = null )
Handles the process request if valid and if authorized.
Contents
Parameters
- $data_source
-
(array|null) (Optional) A source of data if not provided in the request; used for cron-based fallback.
Default value: null
Source
File: src/Tribe/Process/Handler.php
public function maybe_handle( $data_source = null ) {
$data_source = (array) $data_source;
if ( $this->feature_detection->supports_async_process() ) {
parent::maybe_handle();
}
/*
* If the environment does not support AJAX-based async processing then
* fallback to use the cron-based approach and just call the handle method
* removing it first from the action to avoid multiple calls.
*/
remove_action( $this->cron_hook_identifier, array( $this, 'maybe_handle' ) );
$this->handle( $data_source );
}
Changelog
| Version | Description |
|---|---|
| 4.9.5 | Pulled the maybe_handle implementation of the WP_Async_Request class. |
| 4.7.23 | Introduced. |