ACF\AI\GEO

Schema::get_field_type_ranges │ public static │ ACF 6.8.0

Get the supported JSON-LD ranges for a field type

Returns the Schema.org types that a field type can output.

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

Хуков нет.

Возвращает

array. Array of supported range types

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

$result = Schema::get_field_type_ranges( $field_type );
$field_type(строка) (обязательный)
The ACF field type name (e.g., 'image', 'user').

Список изменений

С версии 6.8.0 Введена.

Код Schema::get_field_type_ranges() ACF 6.8.11

public static function get_field_type_ranges( $field_type ) {
	$field_type_obj = acf_get_field_type( $field_type );

	if ( ! $field_type_obj || ! method_exists( $field_type_obj, 'get_jsonld_output_types' ) ) {
		return array();
	}

	return $field_type_obj->get_jsonld_output_types();
}