Event_Export::modify_video_source_export_output( array $fields, WP_Post $event, string $key_name, string $type, boolean $should_show )

Modify the export parameters for the video source.


Parameters

$fields

(array) (Required) The various file format components for this specific event.

$event

(WP_Post) (Required) The WP_Post of this event.

$key_name

(string) (Required) The name of the array key to modify.

$type

(string) (Required) The name of the export type.

$should_show

(boolean) (Required) Whether to modify the export fields for the current user, default to false.


Top ↑

Return

(array) The various file format components for this specific event.


Top ↑

Source

File: src/Tribe/Export/Event_Export.php

	public function modify_video_source_export_output( $fields, $event, $key_name, $type ) {
		if ( 'video' !== $event->virtual_video_source ) {
			return $fields;
		}

		// If an embed video or no linked button, set the permalink and return.
		if (
			(
				$event->virtual_embed_video &&
				! $event->virtual_linked_button
			)||
			(
				! $event->virtual_embed_video &&
				! $event->virtual_linked_button
			)
		 ) {
			$fields[ $key_name ] = $this->format_value( get_the_permalink( $event->ID ), $key_name, $type );

			return $fields;
		}

		$url = $event->virtual_url;


		$fields[ $key_name ] = $this->format_value( $url, $key_name, $type );

		return $fields;
	}

Top ↑

Changelog

Changelog
Version Description
1.8.0 add should_show parameter.
1.7.3 Introduced.