feat: lit/divi-presets-delete – unbenutzte Presets löschen

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Niclas Loosen
2026-10-16 17:50:29 +02:00
co-authored by Claude Sonnet 5.5
parent 25720ad086
commit 2e8f723b01
6 changed files with 300 additions and 2 deletions
+3 -2
View File
@@ -80,13 +80,14 @@ final class Errors
/**
* @param list<array<string, mixed>> $usages
* @param string|null $hint Replaces the default hint (force: true, for lit/media-delete).
*/
public static function inUse(string $message, array $usages): WP_Error
public static function inUse(string $message, array $usages, ?string $hint = null): WP_Error
{
return self::make(
'in_use',
$message,
'Verwendungen prüfen; nur mit force: true trotzdem ausführen.',
$hint ?? 'Verwendungen prüfen; nur mit force: true trotzdem ausführen.',
409,
['usages' => $usages]
);