ACF\Meta

MetaLocation::delete_referencepublicACF 6.4

Deletes a reference key from the database.

Метод класса: MetaLocation{}

Хуков нет.

Возвращает

true|false.

Использование

$MetaLocation = new MetaLocation();
$MetaLocation->delete_reference( $object_id, $field_name ): bool;
$object_id(int|строка)
The ID of the object the metadata is for.
$field_name(строка)
The name of the field to delete the reference from.
По умолчанию: ''

Список изменений

С версии 6.4 Введена.

Код MetaLocation::delete_reference() ACF 6.4.2

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