ACF\AI\GEO

Schema::get_property_range │ public static │ ACF 6.8.0

Get the expected types (range) for a property

Returns the types that a property expects as its value. For example, 'author' expects ['Person', 'Organization']

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

Хуков нет.

Возвращает

array. Array of type names, or empty array if not found

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

$result = Schema::get_property_range( $property );
$property(строка) (обязательный)
The property name.

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

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

Код Schema::get_property_range() ACF 6.8.11

public static function get_property_range( $property ) {
	$property_ranges = SchemaData::get_property_ranges();
	return $property_ranges[ $property ] ?? array();
}