ACF\Meta

Option::get_referencepublicACF 6.4

Gets a reference key for the provided field name.

Method of the class: Option{}

No Hooks.

Returns

string|boolean.

Usage

$Option = new Option();
$Option->get_reference( $object_id, $field_name );
$object_id(int|string)
The ID of the object to get the reference key from.
Default: ''
$field_name(string)
The name of the field to get the reference for.
Default: ''

Changelog

Since 6.4 Introduced.

Option::get_reference() code ACF 6.8.8

public function get_reference( $object_id = '', $field_name = '' ) {
	return get_option( $this->reference_prefix . $object_id . '_' . $field_name, null );
}