LLMS_Background_Updater::task( mixed $callback )
Processes an item in the queue
Parameters Parameters
- $callback
-
(mixed) (Required) PHP callable (function name, callable array, etc...).
Return Return
(mixed) Returns false
when the callback is complete (removes it from the queue). Returns $callback to leave it in the queue.
Source Source
File: includes/class.llms.background.updater.php
protected function task( $callback ) { require_once LLMS_PLUGIN_DIR . 'includes/functions/llms.functions.updates.php'; $callback_name = llms_get_callable_name( $callback ); if ( is_callable( $callback ) ) { $this->log( sprintf( 'Running %s callback', $callback_name ) ); if ( call_user_func( $callback ) ) { return $callback; } $this->log( sprintf( 'Finished %s callback', $callback_name ) ); } else { $this->log( sprintf( 'Could not find %s callback', $callback_name ) ); } return false; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.2.0 | Use llms_get_callable_name() to log callback. |
3.4.3 | |
3.16.10 | Introduced. |