From d5496056eabbb42cd8d0f7236fed6c18024a4635 Mon Sep 17 00:00:00 2001 From: MaxGruson Date: Mon, 17 Jun 2024 15:29:08 +0200 Subject: [PATCH] Fixed description not saving correctly --- build/multimedia-gallery-image/block.json | 4 ++-- build/multimedia-gallery-video/block.json | 4 ++-- build/multimedia-gallery/block.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/multimedia-gallery-image/block.json | 4 ++-- src/multimedia-gallery-image/edit.js | 3 +-- src/multimedia-gallery-video/block.json | 4 ++-- src/multimedia-gallery-video/edit.js | 2 +- src/multimedia-gallery/block.json | 2 +- 10 files changed, 15 insertions(+), 16 deletions(-) diff --git a/build/multimedia-gallery-image/block.json b/build/multimedia-gallery-image/block.json index 7550b0c..9ffbf9a 100644 --- a/build/multimedia-gallery-image/block.json +++ b/build/multimedia-gallery-image/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "maxgruson/multimedia-gallery-image", - "version": "1.0.5", + "version": "1.0.6", "title": "Afbeelding", "category": "media", "icon": "format-image", @@ -19,7 +19,7 @@ "type": "number" }, "description": { - "type": "rich-text" + "type": "string" } }, "parent": [ diff --git a/build/multimedia-gallery-video/block.json b/build/multimedia-gallery-video/block.json index 505cbf1..5c47181 100644 --- a/build/multimedia-gallery-video/block.json +++ b/build/multimedia-gallery-video/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "maxgruson/multimedia-gallery-video", - "version": "1.0.5", + "version": "1.0.6", "title": "Video", "category": "media", "icon": "format-video", @@ -16,7 +16,7 @@ "type": "string" }, "description": { - "type": "rich-text" + "type": "string" } }, "parent": [ diff --git a/build/multimedia-gallery/block.json b/build/multimedia-gallery/block.json index 5d3adcc..f048b48 100644 --- a/build/multimedia-gallery/block.json +++ b/build/multimedia-gallery/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "maxgruson/multimedia-gallery", - "version": "1.0.5", + "version": "1.0.6", "title": "Multimediagalerij", "category": "design", "icon": "format-gallery", diff --git a/package-lock.json b/package-lock.json index 3536a0e..c70829a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "multimedia-gallery-block", - "version": "1.0.5", + "version": "1.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "multimedia-gallery-block", - "version": "1.0.3", + "version": "1.0.6", "license": "GPL-2.0-or-later", "dependencies": { "@splidejs/splide": "^4.1.4", diff --git a/package.json b/package.json index f7d4a60..643d3a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "multimedia-gallery-block", - "version": "1.0.5", + "version": "1.0.6", "description": "Een blok om een gallerij van afbeeldingen en/of YouTube/Vimeo-video’s te maken.", "author": "Max Gruson", "license": "GPL-2.0-or-later", diff --git a/src/multimedia-gallery-image/block.json b/src/multimedia-gallery-image/block.json index 292e1b7..c4e7c93 100644 --- a/src/multimedia-gallery-image/block.json +++ b/src/multimedia-gallery-image/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "maxgruson/multimedia-gallery-image", - "version": "1.0.5", + "version": "1.0.6", "title": "Afbeelding", "category": "media", "icon": "format-image", @@ -19,7 +19,7 @@ "type": "number" }, "description": { - "type": "rich-text" + "type": "string" } }, "parent": [ "maxgruson/multimedia-gallery"], diff --git a/src/multimedia-gallery-image/edit.js b/src/multimedia-gallery-image/edit.js index 23c88fc..a71fc59 100644 --- a/src/multimedia-gallery-image/edit.js +++ b/src/multimedia-gallery-image/edit.js @@ -41,7 +41,6 @@ export default function Edit({attributes, setAttributes}) { return image ? image.media_details.height : 0; }, [ imageID ] ); - return ( <> {/* Main block zone */} @@ -79,7 +78,7 @@ export default function Edit({attributes, setAttributes}) { tagName='figcaption' allowedFormats={ ['core/bold', 'core/italic', 'core/link'] } value={ attributes.description } - onChange={ (description) => setAttributes( { description } ) } + onChange={ (description) => setAttributes( { description: description } ) } placeholder={ __( 'Omschrijving', 'multimedia-gallery' ) } /> diff --git a/src/multimedia-gallery-video/block.json b/src/multimedia-gallery-video/block.json index d935fea..82889d5 100644 --- a/src/multimedia-gallery-video/block.json +++ b/src/multimedia-gallery-video/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "maxgruson/multimedia-gallery-video", - "version": "1.0.5", + "version": "1.0.6", "title": "Video", "category": "media", "icon": "format-video", @@ -16,7 +16,7 @@ "type": "string" }, "description": { - "type": "rich-text" + "type": "string" } }, "parent": [ "maxgruson/multimedia-gallery"], diff --git a/src/multimedia-gallery-video/edit.js b/src/multimedia-gallery-video/edit.js index 10ef966..772a1c2 100644 --- a/src/multimedia-gallery-video/edit.js +++ b/src/multimedia-gallery-video/edit.js @@ -136,7 +136,7 @@ export default function Edit({attributes, setAttributes}) { tagName='figcaption' allowedFormats={ ['core/bold', 'core/italic', 'core/link'] } value={ attributes.description } - onChange={ (description) => setAttributes( { description } ) } + onChange={ (description) => setAttributes( { description: description } ) } placeholder={ __( 'Omschrijving', 'multimedia-gallery' ) } /> diff --git a/src/multimedia-gallery/block.json b/src/multimedia-gallery/block.json index c61029e..a4730c1 100644 --- a/src/multimedia-gallery/block.json +++ b/src/multimedia-gallery/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "maxgruson/multimedia-gallery", - "version": "1.0.5", + "version": "1.0.6", "title": "Multimediagalerij", "category": "design", "icon": "format-gallery",