Yoast_Notification_Center::queue_transaction()privateYoast 1.0

Queues a notification transaction for later execution if notifications are not yet set up.

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

Хуков нет.

Возвращает

true|false. True if transaction was queued, false if it can be performed immediately.

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

// private - только в коде основоного (родительского) класса
$result = $this->queue_transaction( $callback, $args );
$callback(callable) (обязательный)
Callback that performs the transaction.
$args(массив) (обязательный)
Arguments to pass to the callback.

Код Yoast_Notification_Center::queue_transaction() Yoast 22.4

private function queue_transaction( $callback, $args ) {
	if ( $this->notifications_retrieved ) {
		return false;
	}

	$this->add_transaction_to_queue( $callback, $args );

	return true;
}