Featured_Image::dispatch()

Dispatch of the action into the Queue.


Return

(mixed) Result of the dispatch call.


Top ↑

Source

File: src/Tribe/Import/Featured_Image.php

	public function dispatch() {
		if ( ! isset( $this->image_id, $this->event_id ) ) {
			do_action(
				'tribe_log',
				'error',
				$this->identifier,
				[
					'message' => 'Requirements were not met for process this image',
				]
			);

			throw new InvalidArgumentException( 'Event ID and Image ID should be set before trying to dispatch.' );
		}

		$data = [
			'image_id' => $this->image_id,
			'post_id'  => $this->event_id,
		];

		$this->data( $data );

		do_action( 'tribe_log', 'debug', $this->identifier, $data );

		return parent::dispatch();
	}

Top ↑

Changelog

Changelog
Version Description
4.6.5 Introduced.