ACF\Meta

Option::delete_referencepublicACF 6.4

Deletes a reference key from the database.

Method of the class: Option{}

No Hooks.

Returns

true|false.

Usage

$Option = new Option();
$Option->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.

Option::delete_reference() code ACF 6.8.8

public function delete_reference( $object_id = 0, string $field_name = '' ): bool {
	return delete_option( $this->reference_prefix . $object_id . '_' . $field_name );
}