ACF\Meta
MetaLocation::update_reference
Updates a reference key in the database.
Method of the class: MetaLocation{}
No Hooks.
Returns
Int|true|false.
Usage
$MetaLocation = new MetaLocation(); $MetaLocation->update_reference( $object_id, $field_name, $value );
- $object_id(int|string)
- The ID of the object the metadata is for.
- $field_name(string)
- The name of the field to update the reference for.
Default:'' - $value(string)
- The value of the reference key.
Default:''
Changelog
| Since 6.4 | Introduced. |
MetaLocation::update_reference() MetaLocation::update reference code ACF 6.8.8
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 );
}