feat: lit/divi-insert and lit/divi-update
All-or-nothing at ability level (S39), duplicate ids refused (S14), set and attrs on the same path refused (S38), invalid_attr_path error. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -101,6 +101,24 @@ final class Errors
|
||||
return self::make('unsupported', $message, $hint, 400);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unknown Divi attribute paths (spec §5.4, §8.2). $fields names every problem of the call,
|
||||
* the unknown paths with their closest known ones.
|
||||
*
|
||||
* @param array<string, string> $fields Input path => problem.
|
||||
*/
|
||||
public static function invalidAttrPath(array $fields): WP_Error
|
||||
{
|
||||
return self::make(
|
||||
'invalid_attr_path',
|
||||
'Unbekannte Attributpfade; nichts wurde gespeichert.',
|
||||
'Vorschläge unter fields prüfen; alle gültigen Pfade eines Moduls liefert lit/divi-catalog '
|
||||
. '(direkt: lit-divi-catalog) mit module.',
|
||||
400,
|
||||
['fields' => $fields]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A write failed and was rolled back completely.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user