diff --git a/schemas/json/theme.json b/schemas/json/theme.json index 11e36df5c1ef6..e0f3efc01eb1f 100644 --- a/schemas/json/theme.json +++ b/schemas/json/theme.json @@ -296,6 +296,26 @@ } } }, + "settingsPropertiesLightbox": { + "type": "object", + "additionalProperties": false, + "properties": { + "lightbox": { + "description": "Settings related to the lightbox.", + "type": "object", + "properties": { + "enabled": { + "description": "Defines whether the lightbox is enabled or not.", + "type": "boolean" + }, + "allowEditing": { + "description": "Defines whether to show the Lightbox UI in the block editor. If set to `false`, the user won't be able to change the lightbox settings in the block editor.", + "type": "boolean" + } + } + } + } + }, "settingsPropertiesPosition": { "type": "object", "properties": { @@ -688,6 +708,7 @@ { "$ref": "#/definitions/settingsPropertiesDimensions" }, { "$ref": "#/definitions/settingsPropertiesShadow" }, { "$ref": "#/definitions/settingsPropertiesLayout" }, + { "$ref": "#/definitions/settingsPropertiesLightbox" }, { "$ref": "#/definitions/settingsPropertiesPosition" }, { "$ref": "#/definitions/settingsPropertiesSpacing" }, { "$ref": "#/definitions/settingsPropertiesTypography" }, @@ -708,6 +729,7 @@ "color": {}, "dimensions": {}, "layout": {}, + "lightbox": {}, "position": {}, "shadow": {}, "spacing": {}, @@ -2177,6 +2199,7 @@ "background": {}, "color": {}, "layout": {}, + "lightbox": {}, "spacing": {}, "typography": {}, "border": {}, diff --git a/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.html b/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.html new file mode 100644 index 0000000000000..9feeb105951da --- /dev/null +++ b/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.html @@ -0,0 +1,3 @@ + + + diff --git a/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.json b/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.json new file mode 100644 index 0000000000000..a32f031dd34f4 --- /dev/null +++ b/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.json @@ -0,0 +1,18 @@ +[ + { + "name": "core/image", + "isValid": true, + "attributes": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==", + "alt": "", + "caption": "", + "lightbox": { + "enabled": true + }, + "id": 8, + "sizeSlug": "large", + "linkDestination": "none" + }, + "innerBlocks": [] + } +] diff --git a/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.parsed.json b/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.parsed.json new file mode 100644 index 0000000000000..0ca652ff77f83 --- /dev/null +++ b/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.parsed.json @@ -0,0 +1,18 @@ +[ + { + "blockName": "core/image", + "attrs": { + "lightbox": { + "enabled": true + }, + "id": 8, + "sizeSlug": "large", + "linkDestination": "none" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + } +] diff --git a/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.serialized.html b/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.serialized.html new file mode 100644 index 0000000000000..9feeb105951da --- /dev/null +++ b/test/integration/fixtures/blocks/core__image__deprecated-v8-deprecate-behaviors-lightbox.serialized.html @@ -0,0 +1,3 @@ + + +