WPSEO_Option::get_defaults()publicYoast 1.0

Get the enriched default value for an option.

Checks if the concrete class contains an enrich_defaults() method and if so, runs it.

{@internal The enrich_defaults method is used to set defaults for variable array keys in an option, such as array keys depending on post_types and/or taxonomies.}}

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

Хуки из метода

Возвращает

Массив.

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

$WPSEO_Option = new WPSEO_Option();
$WPSEO_Option->get_defaults();

Код WPSEO_Option::get_defaults() Yoast 22.4

public function get_defaults() {
	if ( method_exists( $this, 'translate_defaults' ) ) {
		$this->translate_defaults();
	}

	if ( method_exists( $this, 'enrich_defaults' ) ) {
		$this->enrich_defaults();
	}

	return apply_filters( 'wpseo_defaults', $this->defaults, $this->option_name );
}