ACF\Meta

MetaLocation::update_valuepublicACF 6.4

Updates a field value in the database.

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

Хуков нет.

Возвращает

Int|true|false.

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

$MetaLocation = new MetaLocation();
$MetaLocation->update_value( $object_id, $field, $value );
$object_id(int|строка)
The ID of the object the metadata is for.
$field(массив)
The field array.
По умолчанию: array()
$value(разное)
The metadata value.
По умолчанию: ''

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

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

Код MetaLocation::update_value() ACF 6.4.2

public function update_value( $object_id = 0, array $field = array(), $value = '' ) {
	return update_metadata( $this->location_type, $object_id, $field['name'], $value );
}