Tribe__Settings_Manager::get_option( string $option_name, string $default = '' )

Get value for a specific option


Parameters #

$option_name

(string) (Required) name of option

$default

(string) (Optional) default value

Default value: ''


Top ↑

Return #

(mixed) results of option query


Top ↑

Source #

File: src/Tribe/Settings_Manager.php

	public static function get_option( $option_name, $default = '' ) {
		if ( ! $option_name ) {
			return null;
		}
		$options = self::get_options();

		$option = $default;
		if ( array_key_exists( $option_name, $options ) ) {
			$option = $options[ $option_name ];
		} elseif ( is_multisite() && isset( self::$tribe_events_mu_defaults ) && is_array( self::$tribe_events_mu_defaults ) && in_array( $option_name, array_keys( self::$tribe_events_mu_defaults ) ) ) {
			$option = self::$tribe_events_mu_defaults[ $option_name ];
		}

		return apply_filters( 'tribe_get_single_option', $option, $default, $option_name );
	}