Hooks::filter_tribe_get_single_option( mixed $option, string $default, string $option_name )

Override the get_single_option to return the default event template when FSE is active.


Parameters #

$option

(mixed) (Required) Results of option query.

$default

(string) (Required) The default value.

$option_name

(string) (Required) Name of the option.


Top ↑

Return #

(mixed) results of option query.


Top ↑

Source #

File: src/Events/Editor/Full_Site/Hooks.php

	public function filter_tribe_get_single_option( $option, $default, $option_name ) {
		if ( 'tribeEventsTemplate' !== $option_name ) {
			return $option;
		}

		if ( tec_is_full_site_editor() ) {
			return '';
		}

		return $option;
	}

Top ↑

Changelog #

Changelog
Version Description
5.14.2 Introduced.