ACF\Meta
MetaLocation::get_value
Retrieves a field value from the database.
Метод класса: MetaLocation{}
Хуков нет.
Возвращает
Разное
.
Использование
$MetaLocation = new MetaLocation(); $MetaLocation->get_value( $object_id, $field );
- $object_id(int|строка)
- The ID of the object the metadata is for.
- $field(массив)
- The field array.
По умолчанию: array()
Список изменений
С версии 6.4 | Введена. |
Код MetaLocation::get_value() MetaLocation::get value ACF 6.4.2
public function get_value( $object_id = 0, array $field = array() ) { $meta = get_metadata( $this->location_type, $object_id, $field['name'] ); return $meta[0] ?? null; }