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