Classic_Editor::classic_autodetect_video_source_message( TribeEventsVirtualMeetingsFacebookarray $autodetect_fields, string $video_url, string $video_source, WP_Post|null $event, TribeEventsVirtualMeetingsFacebookarray $ajax_data )

Add the Facebook video message to autodetect fields.


Parameters

$autodetect_fields

(<span class="TribeEventsVirtualMeetingsFacebookarrayTribeEventsVirtualMeetingsFacebookarray<string|">TribeEventsVirtualMeetingsFacebookmixed>) (Required) An array of the autodetect results.

$video_url

(string) (Required) The url to use to autodetect the video source.

$video_source

(string) (Required) The optional name of the video source to attempt to autodetect.

$event

(WP_Post|null) (Required) The event post object, as decorated by the tribe_get_event function.

$ajax_data

(<span class="TribeEventsVirtualMeetingsFacebookarrayTribeEventsVirtualMeetingsFacebookarray<string|">TribeEventsVirtualMeetingsFacebookmixed>) (Required) An array of extra values that were sent by the ajax script.


Top ↑

Return

(TribeEventsVirtualMeetingsFacebookarray<string|TribeEventsVirtualMeetingsFacebookmixed>) An array of the autodetect results.


Top ↑

Source

File: src/Tribe/Meetings/Facebook/Classic_Editor.php

	public function classic_autodetect_video_source_message( $autodetect_fields, $video_url, $video_source, $event, $ajax_data ) {
		if ( ! $event instanceof \WP_Post ) {
			return $autodetect_fields;
		}

		// All video sources are checked on the first autodetect run, only prevent checking of this source if it is set.
		if ( ! empty( $video_source ) && Facebook_Meta::$autodetect_fb_video_id !== $video_source ) {
			return $autodetect_fields;
		}

		// If app id return fields.
		if( tribe_get_option( $this->settings->get_prefix( 'app_id' ), '' ) ) {
			return $autodetect_fields;
		}

		// If no app id return the no Facebook App ID message.
		$autodetect_fields[] = $this->page_api->get_no_facebook_app_id_message_content();

		return $autodetect_fields;
	}

Top ↑

Changelog

Changelog
Version Description
1.8.0 Introduced.