ACF\Meta
Option::delete_reference
Deletes a reference key from the database.
Метод класса: Option{}
Хуков нет.
Возвращает
true|false.
Использование
$Option = new Option(); $Option->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 | Введена. |
Код Option::delete_reference() Option::delete reference ACF 6.4.2
public function delete_reference( $object_id = 0, string $field_name = '' ): bool {
return delete_option( $this->reference_prefix . $object_id . '_' . $field_name );
}