From 37888d387da875607d5df9ef9bc8655192490898 Mon Sep 17 00:00:00 2001 From: mricoul Date: Thu, 26 Mar 2026 16:31:07 +0100 Subject: [PATCH 1/8] fix(blueprint): Refine demo page creation and allowed HTML tags - Update the landing page to use the newly created demo page slug. - Fix PHP syntax errors and nested tags in the page creation step. - Expand the KSES allowed HTML filter to include the `` element and its attributes. - Replace base64 MU-plugin installation with a more readable PHP implementation. --- blueprint.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprint.json b/blueprint.json index 32e2777..a735906 100644 --- a/blueprint.json +++ b/blueprint.json @@ -1,16 +1,11 @@ { "$schema": "https://playground.wordpress.net/blueprint-schema.json", - "landingPage": "/wp-admin/post.php?post=4&action=edit", + "landingPage": "/blockparty-modal-demo/", "preferredVersions": { "php": "8.1", "wp": "latest" }, "steps": [ - { - "step": "login", - "username": "admin", - "password": "password" - }, { "step": "installPlugin", "pluginData": { @@ -24,13 +19,18 @@ "targetFolderName": "blockparty-modal" } }, + { + "step": "login", + "username": "admin", + "password": "password" + }, { "step": "runPHP", - "code": "" + "code": " true,',\n\t'\t\t\\'class\\' => true,',\n\t'\t\t\\'style\\' => true,',\n\t'\t\t\\'id\\' => true,',\n\t'\t\t\\'closedby\\' => true,',\n\t'\t);',\n\t'\t$tags[\\'svg\\'] = array(',\n\t'\t\t\\'xmlns\\' => true,',\n\t'\t\t\\'viewbox\\' => true,',\n\t'\t\t\\'width\\' => true,',\n\t'\t\t\\'height\\' => true,',\n\t'\t\t\\'fill\\' => true,',\n\t'\t\t\\'class\\' => true,',\n\t'\t\t\\'aria-hidden\\' => true,',\n\t'\t\t\\'role\\' => true,',\n\t'\t\t\\'focusable\\' => true,',\n\t'\t);',\n\t'\t$tags[\\'path\\'] = array(',\n\t'\t\t\\'d\\' => true,',\n\t'\t\t\\'fill\\' => true,',\n\t'\t\t\\'class\\' => true,',\n\t'\t);',\n\t'\treturn $tags;',\n\t'}, 10, 2 );',\n);\nfile_put_contents( $file, implode( \"\\n\", $lines ) . \"\\n\" );\necho file_exists( $file ) ? 'mu-plugin installed' : 'mu-plugin failed';\n?>" }, { "step": "runPHP", - "code": "\n
\n\n
\n\n\n\n

My Modal

\n

Blockparty Modal is a WordPress plugin that lets you add accessible modal dialogs to your content via the Gutenberg block editor. You define the modal content and behaviour in the editor; on the frontend, the modal is shown when the user activates a linked trigger (such as a button block).

\n
\n'; $page_id = wp_insert_post(array('post_title' => 'Blockparty Modal', 'post_content' => $page_content, 'post_status' => 'publish', 'post_type' => 'page')); echo 'Page created with ID: ' . $page_id; ?>'; $page_id = wp_insert_post(array('post_title' => 'Blockparty Modal', 'post_content' => $page_content, 'post_status' => 'publish', 'post_type' => 'page')); echo 'Page created with ID: ' . $page_id; ?>" + "code": "\n
\n\n
\n\n\n\n

My Modal

\n

Blockparty Modal is a WordPress plugin that lets you add accessible modal dialogs to your content via the Gutenberg block editor. You define the modal content and behaviour in the editor; on the frontend, the modal is shown when the user activates a linked trigger (such as a button block).

\n
\n'; $page_id = wp_insert_post( array( 'post_title' => 'Blockparty Modal', 'post_name' => 'blockparty-modal-demo', 'post_content' => $page_content, 'post_status' => 'publish', 'post_type' => 'page' ) ); echo 'Page created with ID: ' . $page_id; ?>" } ] } From aa0fe8761a64f2d2f3c4974050f3f34242416ec8 Mon Sep 17 00:00:00 2001 From: Marie Comet Date: Thu, 9 Apr 2026 14:43:23 +0200 Subject: [PATCH 2/8] add setting to set close button label --- ...r_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json | 2 +- languages/blockparty-modal-fr_FR.mo | Bin 3228 -> 3517 bytes languages/blockparty-modal-fr_FR.po | 70 ++++++++----- languages/blockparty-modal.pot | 96 ++++++++++++------ package-lock.json | 6 +- src/blockparty-modal/block.json | 3 + src/blockparty-modal/edit.js | 18 +++- src/blockparty-modal/save.js | 3 +- 8 files changed, 132 insertions(+), 66 deletions(-) diff --git a/languages/blockparty-modal-fr_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json b/languages/blockparty-modal-fr_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json index 5e263f0..9884d11 100644 --- a/languages/blockparty-modal-fr_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json +++ b/languages/blockparty-modal-fr_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json @@ -1 +1 @@ -{"translation-revision-date":"2026-02-18 12:29+0100","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-modal\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Heading\u2026":["Titre\u2026"],"Close this dialog window":["Fermer cette fen\u00eatre modale"],"Hide":["Cacher"],"Preview":["Pr\u00e9visualiser"],"Modal settings":["R\u00e9glages de la modale"],"Closed by":["Ferm\u00e9 par"],"Determines how the modal will be closed.":["Choisissez comment la fen\u00eatre doit \u00eatre ferm\u00e9e."],"Any":["Tout"],"Close request":["Requ\u00eate de fermeture"],"None":["Aucun"],"Prevent page scroll":["\u00c9viter le d\u00e9filement de la page"],"If enabled, the modal will prevent the user from scrolling the page while the modal is open.":["Si cette option est activ\u00e9e, la fen\u00eatre une fois ouverte emp\u00eachera l\u2019utilisateur de d\u00e9filer dans la page."],"Close button":["Bouton de fermeture"],"Enable close button":["Activer le bouton de fermeture"],"You have chosen to not close the modal by clicking the close button. Therefore, the close button will not be displayed.":["Vous avez choisi de ne pas laisser la possibilit\u00e9 de fermer la fen\u00eatre modale en cliquant sur le bouton de fermeture. Par cons\u00e9quent, ce bouton ne s'affichera pas."],"If enabled, a close button will be displayed in the modal. The close button will close the modal when clicked.":["Si cette option est activ\u00e9e, le bouton de fermeture sera affich\u00e9 dans la fen\u00eatre modale. Au clic sur ce bouton, la fen\u00eatre modale sera ferm\u00e9e."],"Display icon only":["Afficher seulement l\u2019ic\u00f4ne"],"If enabled, only the close icon will be displayed in the close button. The label will not be displayed.":["Si cette option est activ\u00e9e, seul l'ic\u00f4ne de fermeture s'affichera sur le bouton de fermeture. Le libell\u00e9 ne sera pas affich\u00e9 visuellement."],"Modal":["Modale"],"Attached modal":["Fen\u00eatre modale jointe"],"Modal to open when block is clicked":["Fen\u00eatre modale \u00e0 ouvrir lorsqu'on clique sur le bloc"],"Select a modal\u2026":["S\u00e9lectionnez une fen\u00eatre modale\u2026"]}}} \ No newline at end of file +{"translation-revision-date":"2026-04-09 14:41+0200","generator":"WP-CLI\/2.10.0","source":"build\/blockparty-modal\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Heading\u2026":["Titre\u2026"],"Close this dialog window":["Fermer cette fen\u00eatre modale"],"Hide":["Cacher"],"Preview":["Pr\u00e9visualiser"],"Modal settings":["R\u00e9glages de la modale"],"Closed by":["Ferm\u00e9 par"],"Determines how the modal will be closed.":["Choisissez comment la fen\u00eatre doit \u00eatre ferm\u00e9e."],"Any":["Tout"],"Close request":["Requ\u00eate de fermeture"],"None":["Aucun"],"Prevent page scroll":["\u00c9viter le d\u00e9filement de la page"],"If enabled, the modal will prevent the user from scrolling the page while the modal is open.":["Si cette option est activ\u00e9e, la fen\u00eatre une fois ouverte emp\u00eachera l\u2019utilisateur de d\u00e9filer dans la page."],"Close button":["Bouton de fermeture"],"Enable close button":["Activer le bouton de fermeture"],"You have chosen to not close the modal by clicking the close button. Therefore, the close button will not be displayed.":["Vous avez choisi de ne pas laisser la possibilit\u00e9 de fermer la fen\u00eatre modale en cliquant sur le bouton de fermeture. Par cons\u00e9quent, ce bouton ne s'affichera pas."],"If enabled, a close button will be displayed in the modal. The close button will close the modal when clicked.":["Si cette option est activ\u00e9e, le bouton de fermeture sera affich\u00e9 dans la fen\u00eatre modale. Au clic sur ce bouton, la fen\u00eatre modale sera ferm\u00e9e."],"Close button label":["Libell\u00e9 du bouton de fermeture"],"The label of the close button. If not set, the default label will be used.":["Le libell\u00e9 du bouton de fermeture. Si non renseign\u00e9e, le libell\u00e9 par d\u00e9faut sera utilis\u00e9."],"Display icon only":["Afficher seulement l\u2019ic\u00f4ne"],"If enabled, only the close icon will be displayed in the close button. The label will not be displayed.":["Si cette option est activ\u00e9e, seul l'ic\u00f4ne de fermeture s'affichera sur le bouton de fermeture. Le libell\u00e9 ne sera pas affich\u00e9 visuellement."],"Attached modal":["Fen\u00eatre modale jointe"],"Modal to open when block is clicked":["Fen\u00eatre modale \u00e0 ouvrir lorsqu'on clique sur le bloc"],"Select a modal\u2026":["S\u00e9lectionnez une fen\u00eatre modale\u2026"],"Modal":["Modale"]}}} \ No newline at end of file diff --git a/languages/blockparty-modal-fr_FR.mo b/languages/blockparty-modal-fr_FR.mo index 05b5b16491dbb93ecec8e9a8baa17eadfe65e06c..e09ef2d510890018d2c4b045ad15cb392841de31 100644 GIT binary patch delta 946 zcmYk)-Aj{E9Ki9j>73?Ere?m(JiQyvp=${m1V%U3f}o_EkT!Rm4?I27?RoH`iwQy@ zU3BpfbkRjZ7Ng5mL?B*_2#2#$oj#Q;6;>-(x10q$WA*Eoe()E*{KHP-?6;8WLQd+C{i#sr@btWPa;`2IH>%wQqcdhc<=Jj+zh1U% zTc?fo3MLaPw}rL>t%;G*2|bpWOpFbW#{Hd!jkLr6tc=G}^6(vE<2d z`a(4{|4sO0YtkYJyHe5_Pp8Wt!HuAO}-{DhSLT%tH_TwgU*&ik){)Y{Cj#}^vpWqFyVH?SI@H6WDu+MDTDVe?E zhHq?>e}{1!b;4h$#K-suFHu#xL7gDzXVch?Jvf2AxQtx(g^AQwMi)2m8%8Nl4v)~s z`W7YIb9{-~z!JW|kEja#MpfVlRe>uUz-!b3;byZR*n_9|7pn`?A9YcOQ;QTjh(fJX zXnkvAD6v92*XhY&oeY&w{Zz?94E2~+S{Fk>F{;&gSp9WhAytho-fyn-CHud zZpmVCCbQt~d79i4Pk+Vnraa-vTz)o{pDPq1Z*tjUelfjT%;gJ}@AZdHYkVY@h{WP! m@zJ4Z%*{0HItjPgKkBCagO#8DgxB|aE|N^Wt&F#PaP9yxT~0Xw diff --git a/languages/blockparty-modal-fr_FR.po b/languages/blockparty-modal-fr_FR.po index 22c9328..30d4006 100644 --- a/languages/blockparty-modal-fr_FR.po +++ b/languages/blockparty-modal-fr_FR.po @@ -4,15 +4,15 @@ msgid "" msgstr "" "Project-Id-Version: Blockparty Modal 1.0.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-modal\n" -"POT-Creation-Date: 2026-02-18T11:23:18+00:00\n" -"PO-Revision-Date: 2026-02-18 12:29+0100\n" +"POT-Creation-Date: 2026-04-09T12:40:41+00:00\n" +"PO-Revision-Date: 2026-04-09 14:41+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr_FR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.8\n" +"X-Generator: Poedit 3.2.2\n" "X-Domain: blockparty-modal\n" #. Plugin Name of the plugin @@ -30,51 +30,54 @@ msgstr "Bloc de fenêtre modale pour l’éditeur WordPress." msgid "Be API Technical Team" msgstr "L'équipe technique de Be API" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:193 build/blockparty-modal/index.js:203 msgid "Heading…" msgstr "Titre…" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:205 build/blockparty-modal/index.js:273 +#: build/blockparty-modal/index.js:519 build/blockparty-modal/index.js:215 +#: build/blockparty-modal/index.js:319 build/blockparty-modal/index.js:558 msgid "Close this dialog window" msgstr "Fermer cette fenêtre modale" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:222 build/blockparty-modal/index.js:236 msgid "Hide" msgstr "Cacher" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:222 build/blockparty-modal/index.js:237 msgid "Preview" msgstr "Prévisualiser" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:227 build/blockparty-modal/index.js:243 msgid "Modal settings" msgstr "Réglages de la modale" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:231 build/blockparty-modal/index.js:247 msgid "Closed by" msgstr "Fermé par" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:232 build/blockparty-modal/index.js:248 msgid "Determines how the modal will be closed." msgstr "Choisissez comment la fenêtre doit être fermée." -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:238 build/blockparty-modal/index.js:258 msgid "Any" msgstr "Tout" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:241 build/blockparty-modal/index.js:262 msgid "Close request" msgstr "Requête de fermeture" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:244 build/blockparty-modal/index.js:407 +#: build/blockparty-modal/index.js:266 build/blockparty-modal/index.js:448 msgid "None" msgstr "Aucun" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:249 build/blockparty-modal/index.js:272 msgid "Prevent page scroll" msgstr "Éviter le défilement de la page" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:250 build/blockparty-modal/index.js:276 msgid "" "If enabled, the modal will prevent the user from scrolling the page while " "the modal is open." @@ -82,15 +85,15 @@ msgstr "" "Si cette option est activée, la fenêtre une fois ouverte empêchera " "l’utilisateur de défiler dans la page." -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:257 build/blockparty-modal/index.js:286 msgid "Close button" msgstr "Bouton de fermeture" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:259 build/blockparty-modal/index.js:288 msgid "Enable close button" msgstr "Activer le bouton de fermeture" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:260 build/blockparty-modal/index.js:294 msgid "" "You have chosen to not close the modal by clicking the close button. " "Therefore, the close button will not be displayed." @@ -99,7 +102,7 @@ msgstr "" "modale en cliquant sur le bouton de fermeture. Par conséquent, ce bouton ne " "s'affichera pas." -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:260 build/blockparty-modal/index.js:298 msgid "" "If enabled, a close button will be displayed in the modal. The close button " "will close the modal when clicked." @@ -107,11 +110,22 @@ msgstr "" "Si cette option est activée, le bouton de fermeture sera affiché dans la " "fenêtre modale. Au clic sur ce bouton, la fenêtre modale sera fermée." -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:267 build/blockparty-modal/index.js:313 +msgid "Close button label" +msgstr "Libellé du bouton de fermeture" + +#: build/blockparty-modal/index.js:268 build/blockparty-modal/index.js:314 +msgid "" +"The label of the close button. If not set, the default label will be used." +msgstr "" +"Le libellé du bouton de fermeture. Si non renseignée, le libellé par défaut " +"sera utilisé." + +#: build/blockparty-modal/index.js:275 build/blockparty-modal/index.js:323 msgid "Display icon only" msgstr "Afficher seulement l’icône" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:276 build/blockparty-modal/index.js:324 msgid "" "If enabled, only the close icon will be displayed in the close button. The " "label will not be displayed." @@ -119,22 +133,22 @@ msgstr "" "Si cette option est activée, seul l'icône de fermeture s'affichera sur le " "bouton de fermeture. Le libellé ne sera pas affiché visuellement." -#: build/blockparty-modal/index.js:1 -msgid "Modal" -msgstr "Modale" - -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:415 build/blockparty-modal/index.js:459 msgid "Attached modal" msgstr "Fenêtre modale jointe" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:418 build/blockparty-modal/index.js:463 msgid "Modal to open when block is clicked" msgstr "Fenêtre modale à ouvrir lorsqu'on clique sur le bloc" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:424 build/blockparty-modal/index.js:474 msgid "Select a modal…" msgstr "Sélectionnez une fenêtre modale…" +#: build/blockparty-modal/index.js:586 build/blockparty-modal/index.js:616 +msgid "Modal" +msgstr "Modale" + #: build/blockparty-modal/block.json msgctxt "block title" msgid "Modal" diff --git a/languages/blockparty-modal.pot b/languages/blockparty-modal.pot index 13ae724..8d0f127 100644 --- a/languages/blockparty-modal.pot +++ b/languages/blockparty-modal.pot @@ -1,17 +1,17 @@ -# Copyright (C) 2026 The WordPress Contributors +# Copyright (C) 2026 Be API Technical Team # This file is distributed under the GPL-2.0-or-later. msgid "" msgstr "" -"Project-Id-Version: Blockparty Modal 1.0.0\n" +"Project-Id-Version: Blockparty Modal 1.0.6\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-modal\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2026-02-18T11:23:18+00:00\n" +"POT-Creation-Date: 2026-04-09T12:40:41+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.11.0\n" +"X-Generator: WP-CLI 2.10.0\n" "X-Domain: blockparty-modal\n" #. Plugin Name of the plugin @@ -29,94 +29,132 @@ msgstr "" msgid "Be API Technical Team" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:193 +#: build/blockparty-modal/index.js:203 msgid "Heading…" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:205 +#: build/blockparty-modal/index.js:273 +#: build/blockparty-modal/index.js:519 +#: build/blockparty-modal/index.js:215 +#: build/blockparty-modal/index.js:319 +#: build/blockparty-modal/index.js:558 msgid "Close this dialog window" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:222 +#: build/blockparty-modal/index.js:236 msgid "Hide" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:222 +#: build/blockparty-modal/index.js:237 msgid "Preview" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:227 +#: build/blockparty-modal/index.js:243 msgid "Modal settings" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:231 +#: build/blockparty-modal/index.js:247 msgid "Closed by" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:232 +#: build/blockparty-modal/index.js:248 msgid "Determines how the modal will be closed." msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:238 +#: build/blockparty-modal/index.js:258 msgid "Any" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:241 +#: build/blockparty-modal/index.js:262 msgid "Close request" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:244 +#: build/blockparty-modal/index.js:407 +#: build/blockparty-modal/index.js:266 +#: build/blockparty-modal/index.js:448 msgid "None" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:249 +#: build/blockparty-modal/index.js:272 msgid "Prevent page scroll" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:250 +#: build/blockparty-modal/index.js:276 msgid "If enabled, the modal will prevent the user from scrolling the page while the modal is open." msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:257 +#: build/blockparty-modal/index.js:286 msgid "Close button" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:259 +#: build/blockparty-modal/index.js:288 msgid "Enable close button" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:260 +#: build/blockparty-modal/index.js:294 msgid "You have chosen to not close the modal by clicking the close button. Therefore, the close button will not be displayed." msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:260 +#: build/blockparty-modal/index.js:298 msgid "If enabled, a close button will be displayed in the modal. The close button will close the modal when clicked." msgstr "" -#: build/blockparty-modal/index.js:1 -msgid "Display icon only" +#: build/blockparty-modal/index.js:267 +#: build/blockparty-modal/index.js:313 +msgid "Close button label" msgstr "" -#: build/blockparty-modal/index.js:1 -msgid "If enabled, only the close icon will be displayed in the close button. The label will not be displayed." +#: build/blockparty-modal/index.js:268 +#: build/blockparty-modal/index.js:314 +msgid "The label of the close button. If not set, the default label will be used." msgstr "" -#: build/blockparty-modal/index.js:1 -msgid "Modal" +#: build/blockparty-modal/index.js:275 +#: build/blockparty-modal/index.js:323 +msgid "Display icon only" +msgstr "" + +#: build/blockparty-modal/index.js:276 +#: build/blockparty-modal/index.js:324 +msgid "If enabled, only the close icon will be displayed in the close button. The label will not be displayed." msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:415 +#: build/blockparty-modal/index.js:459 msgid "Attached modal" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:418 +#: build/blockparty-modal/index.js:463 msgid "Modal to open when block is clicked" msgstr "" -#: build/blockparty-modal/index.js:1 +#: build/blockparty-modal/index.js:424 +#: build/blockparty-modal/index.js:474 msgid "Select a modal…" msgstr "" +#: build/blockparty-modal/index.js:586 +#: build/blockparty-modal/index.js:616 +msgid "Modal" +msgstr "" + #: build/blockparty-modal/block.json msgctxt "block title" msgid "Modal" diff --git a/package-lock.json b/package-lock.json index 503db0d..d71c65e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "blockparty-modal", - "version": "1.0.0", + "version": "1.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "blockparty-modal", - "version": "1.0.0", + "version": "1.0.6", "license": "GPL-2.0-or-later", "dependencies": { "@beapi/icons": "^1.2.6", @@ -31203,7 +31203,7 @@ "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "peer": true, "bin": { diff --git a/src/blockparty-modal/block.json b/src/blockparty-modal/block.json index 31aca6b..0ca1f1d 100644 --- a/src/blockparty-modal/block.json +++ b/src/blockparty-modal/block.json @@ -32,6 +32,9 @@ "type": "boolean", "default": true }, + "closeButtonLabel": { + "type": "string" + }, "displayIconOnly": { "type": "boolean", "default": false diff --git a/src/blockparty-modal/edit.js b/src/blockparty-modal/edit.js index 90c72e5..4942808 100644 --- a/src/blockparty-modal/edit.js +++ b/src/blockparty-modal/edit.js @@ -19,6 +19,7 @@ import { InnerBlocks, RichText, } from '@wordpress/block-editor'; +import { TextControl } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; /* eslint-disable @wordpress/no-unsafe-wp-apis -- ToggleGroupControl is the intended UI for "Closed by" options; allow until stable. */ @@ -87,6 +88,7 @@ export default function Edit( { clientId, attributes, setAttributes } ) { closedBy, displayIconOnly, enableCloseButton, + closeButtonLabel, headingLevel: HeadingTag, modalId, preventScroll, @@ -210,10 +212,7 @@ export default function Edit( { clientId, attributes, setAttributes } ) { className="wp-block-blockparty-modal__close-button" > - { __( - 'Close this dialog window', - 'blockparty-modal' - ) } + { closeButtonLabel ? closeButtonLabel : __( 'Close this dialog window', 'blockparty-modal' ) } @@ -309,6 +308,17 @@ export default function Edit( { clientId, attributes, setAttributes } ) { } disabled={ closedBy === 'none' } /> + { enableCloseButton && ( + + setAttributes( { closeButtonLabel: newCloseButtonLabel } ) + } + placeholder={ __( 'Close this dialog window', 'blockparty-modal' ) } + /> + )} - { __( 'Close this dialog window', 'blockparty-modal' ) } + { closeButtonLabel ? closeButtonLabel : __( 'Close this dialog window', 'blockparty-modal' ) } From 8248c8b5a9ec2166041daf81881ae03a4db74910 Mon Sep 17 00:00:00 2001 From: Marie Comet Date: Thu, 9 Apr 2026 14:45:59 +0200 Subject: [PATCH 3/8] l orthographe >:( --- ...r_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json | 2 +- languages/blockparty-modal-fr_FR.mo | Bin 3517 -> 3449 bytes languages/blockparty-modal-fr_FR.po | 11 ++++------- languages/blockparty-modal.pot | 4 ++-- src/blockparty-modal/edit.js | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/languages/blockparty-modal-fr_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json b/languages/blockparty-modal-fr_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json index 9884d11..347b169 100644 --- a/languages/blockparty-modal-fr_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json +++ b/languages/blockparty-modal-fr_FR-ea0f7248d3d5a5b55d550195c07ecc8f.json @@ -1 +1 @@ -{"translation-revision-date":"2026-04-09 14:41+0200","generator":"WP-CLI\/2.10.0","source":"build\/blockparty-modal\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Heading\u2026":["Titre\u2026"],"Close this dialog window":["Fermer cette fen\u00eatre modale"],"Hide":["Cacher"],"Preview":["Pr\u00e9visualiser"],"Modal settings":["R\u00e9glages de la modale"],"Closed by":["Ferm\u00e9 par"],"Determines how the modal will be closed.":["Choisissez comment la fen\u00eatre doit \u00eatre ferm\u00e9e."],"Any":["Tout"],"Close request":["Requ\u00eate de fermeture"],"None":["Aucun"],"Prevent page scroll":["\u00c9viter le d\u00e9filement de la page"],"If enabled, the modal will prevent the user from scrolling the page while the modal is open.":["Si cette option est activ\u00e9e, la fen\u00eatre une fois ouverte emp\u00eachera l\u2019utilisateur de d\u00e9filer dans la page."],"Close button":["Bouton de fermeture"],"Enable close button":["Activer le bouton de fermeture"],"You have chosen to not close the modal by clicking the close button. Therefore, the close button will not be displayed.":["Vous avez choisi de ne pas laisser la possibilit\u00e9 de fermer la fen\u00eatre modale en cliquant sur le bouton de fermeture. Par cons\u00e9quent, ce bouton ne s'affichera pas."],"If enabled, a close button will be displayed in the modal. The close button will close the modal when clicked.":["Si cette option est activ\u00e9e, le bouton de fermeture sera affich\u00e9 dans la fen\u00eatre modale. Au clic sur ce bouton, la fen\u00eatre modale sera ferm\u00e9e."],"Close button label":["Libell\u00e9 du bouton de fermeture"],"The label of the close button. If not set, the default label will be used.":["Le libell\u00e9 du bouton de fermeture. Si non renseign\u00e9e, le libell\u00e9 par d\u00e9faut sera utilis\u00e9."],"Display icon only":["Afficher seulement l\u2019ic\u00f4ne"],"If enabled, only the close icon will be displayed in the close button. The label will not be displayed.":["Si cette option est activ\u00e9e, seul l'ic\u00f4ne de fermeture s'affichera sur le bouton de fermeture. Le libell\u00e9 ne sera pas affich\u00e9 visuellement."],"Attached modal":["Fen\u00eatre modale jointe"],"Modal to open when block is clicked":["Fen\u00eatre modale \u00e0 ouvrir lorsqu'on clique sur le bloc"],"Select a modal\u2026":["S\u00e9lectionnez une fen\u00eatre modale\u2026"],"Modal":["Modale"]}}} \ No newline at end of file +{"translation-revision-date":"2026-04-09 14:45+0200","generator":"WP-CLI\/2.10.0","source":"build\/blockparty-modal\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Heading\u2026":["Titre\u2026"],"Close this dialog window":["Fermer cette fen\u00eatre modale"],"Hide":["Cacher"],"Preview":["Pr\u00e9visualiser"],"Modal settings":["R\u00e9glages de la modale"],"Closed by":["Ferm\u00e9 par"],"Determines how the modal will be closed.":["Choisissez comment la fen\u00eatre doit \u00eatre ferm\u00e9e."],"Any":["Tout"],"Close request":["Requ\u00eate de fermeture"],"None":["Aucun"],"Prevent page scroll":["\u00c9viter le d\u00e9filement de la page"],"If enabled, the modal will prevent the user from scrolling the page while the modal is open.":["Si cette option est activ\u00e9e, la fen\u00eatre une fois ouverte emp\u00eachera l\u2019utilisateur de d\u00e9filer dans la page."],"Close button":["Bouton de fermeture"],"Enable close button":["Activer le bouton de fermeture"],"You have chosen to not close the modal by clicking the close button. Therefore, the close button will not be displayed.":["Vous avez choisi de ne pas laisser la possibilit\u00e9 de fermer la fen\u00eatre modale en cliquant sur le bouton de fermeture. Par cons\u00e9quent, ce bouton ne s'affichera pas."],"If enabled, a close button will be displayed in the modal. The close button will close the modal when clicked.":["Si cette option est activ\u00e9e, le bouton de fermeture sera affich\u00e9 dans la fen\u00eatre modale. Au clic sur ce bouton, la fen\u00eatre modale sera ferm\u00e9e."],"Close button label":["Libell\u00e9 du bouton de fermeture"],"If not set, the default label will be used.":["Si non renseign\u00e9, le libell\u00e9 par d\u00e9faut sera utilis\u00e9."],"Display icon only":["Afficher seulement l\u2019ic\u00f4ne"],"If enabled, only the close icon will be displayed in the close button. The label will not be displayed.":["Si cette option est activ\u00e9e, seul l'ic\u00f4ne de fermeture s'affichera sur le bouton de fermeture. Le libell\u00e9 ne sera pas affich\u00e9 visuellement."],"Attached modal":["Fen\u00eatre modale jointe"],"Modal to open when block is clicked":["Fen\u00eatre modale \u00e0 ouvrir lorsqu'on clique sur le bloc"],"Select a modal\u2026":["S\u00e9lectionnez une fen\u00eatre modale\u2026"],"Modal":["Modale"]}}} \ No newline at end of file diff --git a/languages/blockparty-modal-fr_FR.mo b/languages/blockparty-modal-fr_FR.mo index e09ef2d510890018d2c4b045ad15cb392841de31..993b9955f8d29cfa7257b9e5fbfa7c3345af4c0e 100644 GIT binary patch delta 494 zcmXxgze_?<6u|NGUYbAqVQQ8y%YF?}QPB(q^R9_U4mQTcw-#CpO9K<+>vp9ns zNde=yi2>Zl7?$w_PqB%ezw_&Uk)kE?fOM~5S!GRXu#VI_%B%b30 zHZY9OxQuPo0$rTMR7iwWa>&1A9Ss)n56S{Od z+8FPZ1ffmY#1N4p#5=R|wmI@InU?RuyYatS)~Z(w-1fzGDp|McW@{z)xKt^-ua71f NT`=A7mzR&$tzW$IIcNX? delta 538 zcmXxgJuCxZ7{Kx8&XwxH_0=A%xG zVFONKJI>)ECUGAx@Cw`NYx@tlu8EXT`sv{?; zI&z0Y_=Ictf!7#s5_!Wis>F}YA`~n^Ptzk>kJqR7B$-Mtp*r{fbTHr-2@??_M5sp< ztqSA5e+^MZ=|n4`Iu|V*>T%tx7^ku29ox!mr0k64Zdo}dn;AE2TdBQV&UMBuuV{=G y4tym|n<&gTT-JF(^V3N1i setAttributes( { closeButtonLabel: newCloseButtonLabel } ) From 43dc97011711605f9e5504b8ff5cad29fd12e4f1 Mon Sep 17 00:00:00 2001 From: Marie Comet Date: Thu, 9 Apr 2026 14:55:17 +0200 Subject: [PATCH 4/8] fix review --- src/blockparty-modal/edit.js | 32 ++++++++++++++++++++++++-------- src/blockparty-modal/save.js | 7 ++++++- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/blockparty-modal/edit.js b/src/blockparty-modal/edit.js index 17ae5eb..61ac816 100644 --- a/src/blockparty-modal/edit.js +++ b/src/blockparty-modal/edit.js @@ -19,7 +19,6 @@ import { InnerBlocks, RichText, } from '@wordpress/block-editor'; -import { TextControl } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; /* eslint-disable @wordpress/no-unsafe-wp-apis -- ToggleGroupControl is the intended UI for "Closed by" options; allow until stable. */ @@ -28,6 +27,7 @@ import { ToggleControl, ToolbarGroup, ToolbarButton, + TextControl, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components'; @@ -212,7 +212,12 @@ export default function Edit( { clientId, attributes, setAttributes } ) { className="wp-block-blockparty-modal__close-button" > - { closeButtonLabel ? closeButtonLabel : __( 'Close this dialog window', 'blockparty-modal' ) } + { closeButtonLabel + ? closeButtonLabel + : __( + 'Close this dialog window', + 'blockparty-modal' + ) } @@ -308,17 +313,28 @@ export default function Edit( { clientId, attributes, setAttributes } ) { } disabled={ closedBy === 'none' } /> - { enableCloseButton && ( + { enableCloseButton && closedBy !== 'none' && ( - setAttributes( { closeButtonLabel: newCloseButtonLabel } ) + setAttributes( { + closeButtonLabel: newCloseButtonLabel, + } ) } - placeholder={ __( 'Close this dialog window', 'blockparty-modal' ) } + placeholder={ __( + 'Close this dialog window', + 'blockparty-modal' + ) } /> - )} + ) } - { closeButtonLabel ? closeButtonLabel : __( 'Close this dialog window', 'blockparty-modal' ) } + { closeButtonLabel + ? closeButtonLabel + : __( + 'Close this dialog window', + 'blockparty-modal' + ) } From 0a5db22a0c4311fbc599c241f51fcc22c5c9d3ef Mon Sep 17 00:00:00 2001 From: Marie Comet Date: Fri, 10 Apr 2026 12:16:39 +0200 Subject: [PATCH 5/8] release 1.0.7 --- .plugin-data | 2 +- README.md | 3 +++ blockparty-modal.php | 4 ++-- blueprint.json | 2 +- languages/blockparty-modal.pot | 2 +- package.json | 2 +- readme.txt | 3 +++ src/blockparty-modal/block.json | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.plugin-data b/.plugin-data index db3c7e7..07f062f 100644 --- a/.plugin-data +++ b/.plugin-data @@ -1,4 +1,4 @@ { - "version": "1.0.6", + "version": "1.0.7", "slug": "blockparty-modal" } diff --git a/README.md b/README.md index 52a29db..e91b8c1 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,9 @@ This plugin is distributed under the GPL-2.0-or-later license. See the [LICENSE] See [readme.txt](readme.txt) for the full version history. Recent highlights: +- **1.0.7** + - Add block setting for the close button label. + - **1.0.6** - Fix `blueprint.json` config. diff --git a/blockparty-modal.php b/blockparty-modal.php index cda091a..5cc69b0 100644 --- a/blockparty-modal.php +++ b/blockparty-modal.php @@ -2,7 +2,7 @@ /** * Plugin Name: Blockparty Modal * Description: Modal block for WordPress editor. - * Version: 1.0.6 + * Version: 1.0.7 * Requires at least: 6.8 * Requires PHP: 8.1 * Author: Be API Technical Team @@ -19,7 +19,7 @@ exit; // Exit if accessed directly. } -define( 'BLOCKPARTY_MODAL_VERSION', '1.0.6' ); +define( 'BLOCKPARTY_MODAL_VERSION', '1.0.7' ); define( 'BLOCKPARTY_MODAL_URL', plugin_dir_url( __FILE__ ) ); define( 'BLOCKPARTY_MODAL_DIR', plugin_dir_path( __FILE__ ) ); diff --git a/blueprint.json b/blueprint.json index a735906..afc0206 100644 --- a/blueprint.json +++ b/blueprint.json @@ -11,7 +11,7 @@ "pluginData": { "resource": "git:directory", "url": "https://github.com/BeAPI/blockparty-modal", - "ref": "1.0.6", + "ref": "1.0.7", "refType": "tag" }, "options": { diff --git a/languages/blockparty-modal.pot b/languages/blockparty-modal.pot index 5113ca1..32605af 100644 --- a/languages/blockparty-modal.pot +++ b/languages/blockparty-modal.pot @@ -2,7 +2,7 @@ # This file is distributed under the GPL-2.0-or-later. msgid "" msgstr "" -"Project-Id-Version: Blockparty Modal 1.0.6\n" +"Project-Id-Version: Blockparty Modal 1.0.7\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-modal\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/package.json b/package.json index bedef6a..893cf10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockparty-modal", - "version": "1.0.6", + "version": "1.0.7", "description": "Add a modal block to the WordPress editor.", "author": "Be API", "license": "GPL-2.0-or-later", diff --git a/readme.txt b/readme.txt index 666475f..47906db 100644 --- a/readme.txt +++ b/readme.txt @@ -45,6 +45,9 @@ directory take precedence. For example, `/assets/screenshot-1.png` would win ove == Changelog == += 1.0.7 = +* Add block setting for the close button label. + = 1.0.6 = * Fix `blueprint.json` config. diff --git a/src/blockparty-modal/block.json b/src/blockparty-modal/block.json index 0ca1f1d..f5bbf87 100644 --- a/src/blockparty-modal/block.json +++ b/src/blockparty-modal/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "blockparty/modal", - "version": "1.0.6", + "version": "", "title": "Modal", "category": "widgets", "description": "Insert a modal dialog that opens on trigger. Configure content and behaviour in the editor; the modal is displayed on the frontend when activated.", From 6dca4474d32234fac9cb687d50ad1c3d8a9110d0 Mon Sep 17 00:00:00 2001 From: Marie Comet Date: Fri, 10 Apr 2026 12:22:22 +0200 Subject: [PATCH 6/8] re-add block version --- src/blockparty-modal/block.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blockparty-modal/block.json b/src/blockparty-modal/block.json index f5bbf87..ccdecf4 100644 --- a/src/blockparty-modal/block.json +++ b/src/blockparty-modal/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "blockparty/modal", - "version": "", + "version": "1.0.7", "title": "Modal", "category": "widgets", "description": "Insert a modal dialog that opens on trigger. Configure content and behaviour in the editor; the modal is displayed on the frontend when activated.", From e871df336ef35f31aa9eadeb4367968db11b40a6 Mon Sep 17 00:00:00 2001 From: Marie Comet Date: Fri, 10 Apr 2026 12:24:31 +0200 Subject: [PATCH 7/8] update package lock --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index d71c65e..405b1ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "blockparty-modal", - "version": "1.0.6", + "version": "1.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "blockparty-modal", - "version": "1.0.6", + "version": "1.0.7", "license": "GPL-2.0-or-later", "dependencies": { "@beapi/icons": "^1.2.6", From c78c30d1b18aadd8bf96852f3312cb24ff9c6f7d Mon Sep 17 00:00:00 2001 From: Marie Comet Date: Mon, 13 Apr 2026 09:14:43 +0200 Subject: [PATCH 8/8] update stable tag in readme.txt --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 47906db..fd897ee 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: Be API Technical Team Tags: block Tested up to: 6.8 -Stable tag: 1.0.1 +Stable tag: 1.0.7 License: GPL-2.0-or-later License URI: https://www.gnu.org/licenses/gpl-2.0.html