Hooks::live_filters_maybe_convert( mixed $value )

Converts old (boolean) values to the new string values.


Parameters

$value

(mixed) (Required) The value to maybe convert.


Top ↑

Return

(string) Modified value of Live filters Update.


Top ↑

Source

File: src/Tribe/Views/V2/Hooks.php

	public function live_filters_maybe_convert( $value ) {
		$return_value = 'automatic';

		if ( empty( $value ) || 'manual' === $value ) {
			$return_value = 'manual';
		}

		/**
		 * Allow filtering of the new value for Live Filters.
		 *
		 * @since 5.0.3
		 *
		 * @param string $return_value Which value we are going to return as the conversion.
		 * @param string $value        Which value was previously used.
		 */
		$return_value = apply_filters( 'tribe_events_option_convert_live_filters', $return_value, $value );

		return $return_value;
	}

Top ↑

Changelog

Changelog
Version Description
5.0.3 Introduced.