WPSEO_Option::get_option()publicYoast 1.0

Merge an option with its default values.

This method should not be called directly!!! It is only meant to filter the get_option() results.

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

Хуков нет.


Разное. Option merged with the defaults for that option.


$WPSEO_Option = new WPSEO_Option();
$WPSEO_Option->get_option( $options );
Option value.
По умолчанию: null

Код WPSEO_Option::get_option() Yoast 19.7.1

public function get_option( $options = null ) {
	$filtered = $this->array_filter_merge( $options );

	 * If the option contains variable option keys, make sure we don't remove those settings
	 * - even if the defaults are not complete yet.
	 * Unfortunately this means we also won't be removing the settings for post types or taxonomies
	 * which are no longer in the WP install, but rather that than the other way around.
	if ( isset( $this->variable_array_key_patterns ) ) {
		$filtered = $this->retain_variable_keys( $options, $filtered );

	return $filtered;