Yoast\WP\SEO\Abilities\Application

Site_Representation_Updater::get_settings │ private │ Yoast 1.0

Returns the current value of each field, cast to the type its schema declares.

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

Хуков нет.

Возвращает

array<string, mixed>. The current value of each field.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_settings( $fields ): array;
$fields(массив) (обязательный)
.

Код Site_Representation_Updater::get_settings() Yoast 28.9

private function get_settings( array $fields ): array {
	$settings = [];

	foreach ( $fields as $field_name => $schema ) {
		$settings[ $field_name ] = $this->cast_to_schema_type( $this->options_helper->get( $field_name ), $schema );
	}

	return $settings;
}