WPSEO_Option::get_override_option()protectedYoast 1.0

Retrieves the value of the override option, if available.

An override option contains values that may determine access to certain sub-variables of this option.

Only regular options in multisite can have override options, which in that case would be network options.

Метод класса: WPSEO_Option{}

Хуков нет.

Возвращает

Массив. Override option value, or empty array if unavailable.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_override_option();

Код WPSEO_Option::get_override_option() Yoast 22.4

protected function get_override_option() {
	if ( empty( $this->override_option_name ) || $this->multisite_only === true || ! is_multisite() ) {
		return [];
	}

	return get_site_option( $this->override_option_name, [] );
}