ActionScheduler_Abstract_QueueRunner::get_time_limit()protectedWC 1.0

Get the maximum number of seconds a batch can run for.

Метод класса: ActionScheduler_Abstract_QueueRunner{}

Возвращает

int. The number of seconds.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_time_limit();

Код ActionScheduler_Abstract_QueueRunner::get_time_limit() WC 8.7.0

protected function get_time_limit() {

	$time_limit = 30;

	// Apply deprecated filter from deprecated get_maximum_execution_time() method
	if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) {
		_deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' );
		$time_limit = apply_filters( 'action_scheduler_maximum_execution_time', $time_limit );
	}

	return absint( apply_filters( 'action_scheduler_queue_runner_time_limit', $time_limit ) );
}