Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions blockparty-faq.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ function blockparty_faq_init(): void {
'forceExpand' => false,
'hasAnimation' => true,
'openMultiple' => false,
'panelSelector' => '.faq__panel',
'panelSelector' => '.wp-block-blockparty-faq-answer',
'prefixId' => 'block-faq',
'triggerSelector' => '.faq__trigger',
'triggerSelector' => '.wp-block-blockparty-faq-trigger',
]
),
];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"translation-revision-date":"2026-06-26 15:28+0200","generator":"WP-CLI\/2.11.0","source":"build\/faq-answer\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Answer\u2026":["R\u00e9ponse\u2026"]}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"translation-revision-date":"2026-06-26 15:28+0200","generator":"WP-CLI\/2.11.0","source":"build\/faq-item\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Add FAQ item":["Ajouter un \u00e9l\u00e9ment"],"Remove FAQ item":["Supprimer l\u2019\u00e9l\u00e9ment"]}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"translation-revision-date":"2026-06-26 15:28+0200","generator":"WP-CLI\/2.11.0","source":"build\/faq-question\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Question\u2026?":["Question\u2026?"]}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"translation-revision-date": "2026-06-26 15:28+0200",
"generator": "WP-CLI\/2.11.0",
"source": "build\/faq\/index.js",
"domain": "messages",
"locale_data": {
"messages": {
"": {
"domain": "messages",
"lang": "fr_FR",
"plural-forms": "nplurals=2; plural=(n != 1);"
},
"Add FAQ item": [
"Ajouter un \u00e9l\u00e9ment"
],
"Remove FAQ item": [
"Supprimer l\u2019\u00e9l\u00e9ment"
],
"Settings": [
"R\u00e9glages"
],
"Accordion behavior": [
"Comportement d\u2019accord\u00e9on"
],
"If enabled, the FAQ will be displayed as an accordion component.": [
"Si cette option est activ\u00e9e, la FAQ s'affichera sous forme d'accord\u00e9on."
],
"Question heading level": [
"Niveau de titre de la question"
],
"Define the heading level for each FAQ question.": [
"D\u00e9finissez le niveau de titre pour chaque question de la FAQ."
],
"Heading level %d": [
"Niveau de titre %d"
]
}
}
}

This file was deleted.

Binary file modified languages/blockparty-faq-fr_FR.mo
Binary file not shown.
78 changes: 44 additions & 34 deletions languages/blockparty-faq-fr_FR.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ msgid ""
msgstr ""
"Project-Id-Version: Blockparty Faq 1.0.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-faq\n"
"POT-Creation-Date: 2026-01-26T15:49:49+00:00\n"
"PO-Revision-Date: 2026-01-26 16:50+0100\n"
"POT-Creation-Date: 2026-06-26T13:28:07+00:00\n"
"PO-Revision-Date: 2026-06-26 15:28+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.9\n"
"X-Domain: blockparty-faq\n"

#. Plugin Name of the plugin
Expand Down Expand Up @@ -40,51 +40,47 @@ msgstr ""
msgid "Be API Technical team"
msgstr "L’équipe technique de Be API"

#: build/index.js:1
#: build/faq-answer/index.js:1
msgid "Answer…"
msgstr "Réponse…"

#: build/faq-item/index.js:1 build/faq/index.js:1
msgid "Add FAQ item"
msgstr "Ajouter un élément"

#: build/index.js:1
#: build/faq-item/index.js:1 build/faq/index.js:1
msgid "Remove FAQ item"
msgstr "Supprimer l’élément"

#: build/index.js:1
msgid "FAQ Settings"
msgstr "Réglages de FAQ"
#: build/faq-question/index.js:1
msgid "Question…?"
msgstr "Question…?"

#: build/index.js:1
#: build/faq/index.js:1
msgid "Settings"
msgstr "Réglages"

#: build/faq/index.js:1
msgid "Accordion behavior"
msgstr "Comportement d’accordéon"

#: build/index.js:1
msgid ""
"If enabled, the HTML structure will be interpreted as an accordion from "
"screen readers."
#: build/faq/index.js:1
msgid "If enabled, the FAQ will be displayed as an accordion component."
msgstr ""
"Si c’est activé, la structure HTML du bloc sera interprété en tant "
"qu’accordéon pour les technologies d’assistance."
"Si cette option est activée, la FAQ s'affichera sous forme d'accordéon."

#: build/index.js:1
msgid "Question…?"
msgstr "Question…?"
#: build/faq/index.js:1
msgid "Question heading level"
msgstr "Niveau de titre de la question"

#: build/index.js:1
msgid "Answer…"
msgstr "Réponse…"

#: block.json
msgctxt "block title"
msgid "FAQ"
msgstr "FAQ"
#: build/faq/index.js:1
msgid "Define the heading level for each FAQ question."
msgstr "Définissez le niveau de titre pour chaque question de la FAQ."

#: block.json
msgctxt "block description"
msgid ""
"A FAQ block for WordPress Editor that provided structured data based on FAQ "
"schema."
msgstr ""
"A FAQ block for WordPress Editor that provided structured data based on FAQ "
"schema."
#. translators: %d: heading level number (2–6).
#: build/faq/index.js:2
msgid "Heading level %d"
msgstr "Niveau de titre %d"

#: build/faq-answer/block.json
msgctxt "block title"
Expand Down Expand Up @@ -115,3 +111,17 @@ msgstr "Question de FAQ"
msgctxt "block description"
msgid "Content of the FAQ question."
msgstr "Contenu de la question FAQ."

#: build/faq/block.json
msgctxt "block title"
msgid "FAQ"
msgstr "FAQ"

#: build/faq/block.json
msgctxt "block description"
msgid ""
"A FAQ block for WordPress Editor that provided structured data based on FAQ "
"schema."
msgstr ""
"A FAQ block for WordPress Editor that provided structured data based on FAQ "
"schema."
55 changes: 35 additions & 20 deletions languages/blockparty-faq.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the GPL-2.0-or-later.
msgid ""
msgstr ""
"Project-Id-Version: Blockparty FAQ 1.0.2\n"
"Project-Id-Version: Blockparty FAQ 2.0.3\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-faq\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2026-01-26T15:49:49+00:00\n"
"POT-Creation-Date: 2026-06-26T13:28:07+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: blockparty-faq\n"
Expand All @@ -35,42 +35,47 @@ msgstr ""
msgid "Be API Technical team"
msgstr ""

#: build/index.js:1
#: build/faq-answer/index.js:1
msgid "Answer…"
msgstr ""

#: build/faq-item/index.js:1
#: build/faq/index.js:1
msgid "Add FAQ item"
msgstr ""

#: build/index.js:1
#: build/faq-item/index.js:1
#: build/faq/index.js:1
msgid "Remove FAQ item"
msgstr ""

#: build/index.js:1
msgid "FAQ Settings"
#: build/faq-question/index.js:1
msgid "Question…?"
msgstr ""

#: build/index.js:1
msgid "Accordion behavior"
#: build/faq/index.js:1
msgid "Settings"
msgstr ""

#: build/index.js:1
msgid "If enabled, the HTML structure will be interpreted as an accordion from screen readers."
#: build/faq/index.js:1
msgid "Accordion behavior"
msgstr ""

#: build/index.js:1
msgid "Question…?"
#: build/faq/index.js:1
msgid "If enabled, the FAQ will be displayed as an accordion component."
msgstr ""

#: build/index.js:1
msgid "Answer…"
#: build/faq/index.js:1
msgid "Question heading level"
msgstr ""

#: block.json
msgctxt "block title"
msgid "FAQ"
#: build/faq/index.js:1
msgid "Define the heading level for each FAQ question."
msgstr ""

#: block.json
msgctxt "block description"
msgid "A FAQ block for WordPress Editor that provided structured data based on FAQ schema."
#. translators: %d: heading level number (2–6).
#: build/faq/index.js:2
msgid "Heading level %d"
msgstr ""

#: build/faq-answer/block.json
Expand Down Expand Up @@ -102,3 +107,13 @@ msgstr ""
msgctxt "block description"
msgid "Content of the FAQ question."
msgstr ""

#: build/faq/block.json
msgctxt "block title"
msgid "FAQ"
msgstr ""

#: build/faq/block.json
msgctxt "block description"
msgid "A FAQ block for WordPress Editor that provided structured data based on FAQ schema."
msgstr ""
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.

42 changes: 42 additions & 0 deletions src/faq-answer/deprecated.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* WordPress dependencies
*/
import { useBlockProps, InnerBlocks } from '@wordpress/block-editor';

/**
* Save function for deprecated 2.0.x markup with faq__panel class.
*
* @param {Object} props Component props.
* @param {Object} props.attributes Block attributes.
* @return {JSX.Element} Saved block markup.
*/
function deprecatedSave( { attributes } ) {
const { isAccordion = true } = attributes;
const blockProps = useBlockProps.save( {
className: 'faq__panel',
} );

const divProps = isAccordion
? { ...blockProps, role: 'region' }
: blockProps;

return (
<div { ...divProps }>
<InnerBlocks.Content />
</div>
);
}

const deprecated = [
{
attributes: {
isAccordion: {
type: 'boolean',
default: true,
},
},
save: deprecatedSave,
},
];

export default deprecated;
32 changes: 16 additions & 16 deletions src/faq-answer/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ const ALLOWED_BLOCKS = [
];

export default function Edit() {
const blockProps = useBlockProps( {
className: 'faq__panel',
} );
const blockProps = useBlockProps();

return (
<div { ...blockProps } role="region">
<InnerBlocks
allowedBlocks={ ALLOWED_BLOCKS }
template={ [
[
'core/paragraph',
{
placeholder: __( 'Answer…', 'blockparty-faq' ),
},
],
] }
templateLock={ false }
/>
<div { ...blockProps }>
<div className="wp-block-blockparty-faq-answer__inner">
<InnerBlocks
allowedBlocks={ ALLOWED_BLOCKS }
template={ [
[
'core/paragraph',
{
placeholder: __( 'Answer…', 'blockparty-faq' ),
},
],
] }
templateLock={ false }
/>
</div>
</div>
);
}
6 changes: 6 additions & 0 deletions src/faq-answer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import './style.scss';
import './editor.scss';
import Edit from './edit';
import save from './save';
import deprecated from './deprecated';
import metadata from './block.json';

registerBlockType( metadata.name, {
Expand All @@ -24,5 +25,10 @@ registerBlockType( metadata.name, {
* @see ./save.js
*/
save,

/**
* @see ./deprecated.js
*/
deprecated,
icon: postContent,
} );
Loading
Loading