feat(css): globales CSS bearbeiten (lit/divi-custom-css-get und -update)
WordPress „Zusätzliches CSS“ (in Divi „Eigenes CSS“) über die Design-Pipeline: Probelauf mit Zeilen-Diff, design_rev, Bestätigung, Snapshot, Rollback und Wiederherstellen (Bereich custom_css). Der Guard lehnt </style, <script, expression(, javascript: und neue @import ab und warnt bei fremden Hosts; nur Neues zählt, Bestehendes blockiert keine Änderung. Erfordert edit_css und die Divi-Rolle Theme-Anpassung. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
96fa58188b
commit
ac333a164c
@@ -21,7 +21,7 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
final class DiviDesignRestoreAbility implements Ability, RequiresDiviFeatures
|
||||
{
|
||||
private const ID = '/^(colors|variables|presets|theme_options)-\d{8}T\d{6}Z-[0-9a-f]{6}$/D';
|
||||
private const ID = '/^(colors|variables|presets|theme_options|custom_css)-\d{8}T\d{6}Z-[0-9a-f]{6}$/D';
|
||||
|
||||
/** @var array<string, RestorePlanner> area => planner */
|
||||
private array $planners = [];
|
||||
@@ -53,7 +53,8 @@ final class DiviDesignRestoreAbility implements Ability, RequiresDiviFeatures
|
||||
. 'beim Nutzer confirm: true; vorher wird der aktuelle Stand selbst gesichert. Bereiche: presets, colors '
|
||||
. '(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).';
|
||||
. 'gesetzt sind, kehren zum Divi-Standard zurück) und custom_css (das ganze eigene CSS, nur für dasselbe '
|
||||
. 'Theme).';
|
||||
}
|
||||
|
||||
public function inputSchema(): array
|
||||
|
||||
Reference in New Issue
Block a user