ACF\AI\GEO

Schema::get_field_type_rangespublic staticACF 6.8.0

Get the supported JSON-LD ranges for a field type

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

Method of the class: Schema{}

No Hooks.

Returns

Array. Array of supported range types

Usage

$result = Schema::get_field_type_ranges( $field_type );
$field_type(string) (required)
The ACF field type name (e.g., 'image', 'user').

Changelog

Since 6.8.0 Introduced.

Schema::get_field_type_ranges() code ACF 6.8.8

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();
}