Tribe__Events__Community__Main::multisiteDefaultOverride( mixed $value, string $key, array $field )

Allows multisite installs to override defaults for settings.


Parameters

$key

(string) (Required) The option key.

$field

(array) (Required) The field.

$value

(mixed) (Required) The current default.


Top ↑

Return

(mixed) The MU default value of the option.


Top ↑

Source

File: src/Tribe/Main.php

		public function multisiteDefaultOverride( $value, $key, $field ) {
			if ( isset( $field['parent_option'] ) && $field['parent_option'] == self::OPTIONNAME ) {
				$current_options = $this->getOptions();
				if ( isset( $current_options[ $key ] ) ) {
					return $value;
				} elseif ( isset( self::$tribeCommunityEventsMuDefaults[ $key ] ) ) {
					$value = self::$tribeCommunityEventsMuDefaults[ $key ];
				}
			}
			return $value;
		}

Top ↑

Changelog

Changelog
Version Description
1.0.6 Introduced.