feat: lit/divi-design-restore stellt theme_options wieder her; Hinweis auf Etappe 4d entfällt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
2e3b740260
commit
bba5a618ed
@@ -17,7 +17,7 @@ defined('ABSPATH') || exit;
|
||||
* lit/divi-design-restore (spec §5, G6, ruling V10): writes a snapshot back through the change pipeline – dry run with
|
||||
* the diff to the current state, confirm with design_rev, and first a snapshot of the current state, so a restore can
|
||||
* be undone as well. The area comes from the snapshot ID; its RestorePlanner brings the rights, the Divi features and
|
||||
* the plan. Areas without a planner (theme_options until Etappe 4d) are not restorable yet.
|
||||
* the plan. A snapshot of an area without a planner is refused as unsupported, never treated as a no-op.
|
||||
*/
|
||||
final class DiviDesignRestoreAbility implements Ability, RequiresDiviFeatures
|
||||
{
|
||||
@@ -51,8 +51,9 @@ final class DiviDesignRestoreAbility implements Ability, RequiresDiviFeatures
|
||||
return 'Stellt einen Snapshot des Designsystems wieder her (snapshot_id aus lit/divi-design-snapshots oder '
|
||||
. 'einer Änderungsantwort). Zuerst Probelauf (Unterschied zum aktuellen Stand, design_rev), nach Rückfrage '
|
||||
. 'beim Nutzer confirm: true; vorher wird der aktuelle Stand selbst gesichert. Bereiche: presets, colors '
|
||||
. '(Farben, die es im Snapshot nicht gibt, entfallen) und variables (Variablen, die erst nach dem Snapshot '
|
||||
. 'entstanden, bleiben archiviert erhalten).';
|
||||
. '(Farben, die es im Snapshot nicht gibt, entfallen), variables (Variablen, die erst nach dem Snapshot '
|
||||
. 'entstanden, bleiben archiviert erhalten) und theme_options (Theme-Optionen, die im Snapshot nicht '
|
||||
. 'gesetzt sind, kehren zum Divi-Standard zurück).';
|
||||
}
|
||||
|
||||
public function inputSchema(): array
|
||||
@@ -111,8 +112,8 @@ final class DiviDesignRestoreAbility implements Ability, RequiresDiviFeatures
|
||||
$planner = $this->planners[$area] ?? null;
|
||||
if ($planner === null) {
|
||||
return Errors::unsupported(
|
||||
'Snapshots dieses Bereichs lassen sich noch nicht wiederherstellen.',
|
||||
'Theme-Optionen folgen mit Etappe 4d.'
|
||||
'Snapshots dieses Bereichs lassen sich hier nicht wiederherstellen.',
|
||||
'Den Stand des Snapshots im Divi-Builder bzw. -Customizer von Hand herstellen.'
|
||||
);
|
||||
}
|
||||
$snapshot = $this->snapshots->get($area, $id);
|
||||
|
||||
Reference in New Issue
Block a user