From dd28afa2e812a25536b2ec033f6e169e41d78901 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Wed, 6 Sep 2023 17:36:47 +0200 Subject: [PATCH] RemoteBlockEditorSettings - Add gutenbergVersion --- WordPressKit/RemoteBlockEditorSettings.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WordPressKit/RemoteBlockEditorSettings.swift b/WordPressKit/RemoteBlockEditorSettings.swift index cd569cf2..4c683e26 100644 --- a/WordPressKit/RemoteBlockEditorSettings.swift +++ b/WordPressKit/RemoteBlockEditorSettings.swift @@ -8,6 +8,7 @@ public class RemoteBlockEditorSettings: Codable { case listBlockV2 = "__experimentalEnableListBlockV2" case rawStyles = "__experimentalStyles" case rawFeatures = "__experimentalFeatures" + case gutenbergVersion = "gutenbergVersion" case colors case gradients } @@ -18,6 +19,7 @@ public class RemoteBlockEditorSettings: Codable { public let listBlockV2: Bool public let rawStyles: String? public let rawFeatures: String? + public let gutenbergVersion: String? public let colors: [[String: String]]? public let gradients: [[String: String]]? @@ -45,6 +47,7 @@ public class RemoteBlockEditorSettings: Codable { self.listBlockV2 = (try? map.decode(Bool.self, forKey: .listBlockV2)) ?? false self.rawStyles = RemoteBlockEditorSettings.parseToString(map, .rawStyles) self.rawFeatures = RemoteBlockEditorSettings.parseToString(map, .rawFeatures) + self.gutenbergVersion = (try? map.decode(String.self, forKey: .gutenbergVersion)) ?? "" self.colors = try? map.decode([[String: String]].self, forKey: .colors) self.gradients = try? map.decode([[String: String]].self, forKey: .gradients) }