ACF\Meta
MetaLocation::update_value
Updates a field value in the database.
Method of the class: MetaLocation{}
No Hooks.
Returns
Int|true|false.
Usage
$MetaLocation = new MetaLocation(); $MetaLocation->update_value( $object_id, $field, $value );
- $object_id(int|string)
- The ID of the object the metadata is for.
- $field(array)
- The field array.
Default:array() - $value(mixed)
- The metadata value.
Default:''
Changelog
| Since 6.4 | Introduced. |
MetaLocation::update_value() MetaLocation::update value code ACF 6.8.8
public function update_value( $object_id = 0, array $field = array(), $value = '' ) {
return update_metadata( $this->location_type, $object_id, $field['name'], $value );
}