ACF\Meta

Option::delete_valuepublicACF 6.4

Deletes a field value from the database.

Method of the class: Option{}

No Hooks.

Returns

true|false.

Usage

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

Option::delete_value() code ACF 6.8.8

public function delete_value( $object_id = 0, array $field = array() ): bool {
	return delete_option( $object_id . '_' . $field['name'] );
}