Skip to content

Commit

Permalink
Fixed description not saving correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGruson committed Jun 17, 2024
1 parent 292a28a commit d549605
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions build/multimedia-gallery-image/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -19,7 +19,7 @@
"type": "number"
},
"description": {
"type": "rich-text"
"type": "string"
}
},
"parent": [
Expand Down
4 changes: 2 additions & 2 deletions build/multimedia-gallery-video/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -16,7 +16,7 @@
"type": "string"
},
"description": {
"type": "rich-text"
"type": "string"
}
},
"parent": [
Expand Down
2 changes: 1 addition & 1 deletion build/multimedia-gallery/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/multimedia-gallery-image/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -19,7 +19,7 @@
"type": "number"
},
"description": {
"type": "rich-text"
"type": "string"
}
},
"parent": [ "maxgruson/multimedia-gallery"],
Expand Down
3 changes: 1 addition & 2 deletions src/multimedia-gallery-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export default function Edit({attributes, setAttributes}) {
return image ? image.media_details.height : 0;
}, [ imageID ] );


return (
<>
{/* Main block zone */}
Expand Down Expand Up @@ -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' ) }
/>
</figure>
Expand Down
4 changes: 2 additions & 2 deletions src/multimedia-gallery-video/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -16,7 +16,7 @@
"type": "string"
},
"description": {
"type": "rich-text"
"type": "string"
}
},
"parent": [ "maxgruson/multimedia-gallery"],
Expand Down
2 changes: 1 addition & 1 deletion src/multimedia-gallery-video/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) }
/>
</figure>
Expand Down
2 changes: 1 addition & 1 deletion src/multimedia-gallery/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d549605

Please sign in to comment.