LLMS_Background_Updater::task( string $callback )

Processes an item in the queue


Description Description


Parameters Parameters

$callback

(string) (Required) name of the callback function to execute


Top ↑

Return Return

(mixed) false removes item from the queue truthy (callback function name) leaves it in the queue for further processing


Top ↑

Source Source

File: includes/class.llms.background.updater.php

	protected function task( $callback ) {

		include_once dirname( __FILE__ ) . '/functions/llms.functions.updates.php';

		if ( is_callable( $callback ) ) {
			$this->log( sprintf( 'Running %s callback', $callback ) );
			if ( call_user_func( $callback ) ) {
				// $this->log( sprintf( '%s callback will rerun', $callback ) );
				return $callback;
			}
			$this->log( sprintf( 'Finished %s callback', $callback ) );

		} else {
			$this->log( sprintf( 'Could not find %s callback', $callback ) );
		}

		return false;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.4.3 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.