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