ACF\Meta
MetaLocation::update_reference
Updates a reference key in the database.
Метод класса: MetaLocation{}
Хуков нет.
Возвращает
Int|true|false
.
Использование
$MetaLocation = new MetaLocation(); $MetaLocation->update_reference( $object_id, $field_name, $value );
- $object_id(int|строка)
- The ID of the object the metadata is for.
- $field_name(строка)
- The name of the field to update the reference for.
По умолчанию: '' - $value(строка)
- The value of the reference key.
По умолчанию: ''
Список изменений
С версии 6.4 | Введена. |
Код MetaLocation::update_reference() MetaLocation::update reference ACF 6.4.2
public function update_reference( $object_id = 0, string $field_name = '', string $value = '' ) { return update_metadata( $this->location_type, $object_id, $this->reference_prefix . $field_name, $value ); }