ACF\Meta

Option::get_referencepublicACF 6.4

Gets a reference key for the provided field name.

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

Хуков нет.

Возвращает

string|boolean.

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

$Option = new Option();
$Option->get_reference( $object_id, $field_name );
$object_id(int|строка)
The ID of the object to get the reference key from.
По умолчанию: ''
$field_name(строка)
The name of the field to get the reference for.
По умолчанию: ''

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

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

Код Option::get_reference() ACF 6.8.8

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