From 9820dcea62e070193d5c8d4d69e3d2b813cf1e42 Mon Sep 17 00:00:00 2001 From: mricoul Date: Tue, 17 Feb 2026 11:21:03 +0100 Subject: [PATCH 1/5] feat: allows button blocks in FAQ answer Extends the allowed blocks within the FAQ answer block to include button and buttons blocks. This provides users with more flexibility in designing FAQ answers. --- src/faq-answer/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/faq-answer/edit.js b/src/faq-answer/edit.js index b76f4cf..3c86d7d 100644 --- a/src/faq-answer/edit.js +++ b/src/faq-answer/edit.js @@ -4,7 +4,7 @@ import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; -const ALLOWED_BLOCKS = [ 'core/paragraph', 'core/heading', 'core/list' ]; +const ALLOWED_BLOCKS = [ 'core/paragraph', 'core/heading', 'core/list', 'core/buttons', 'core/button' ]; export default function Edit() { const blockProps = useBlockProps( { From 38c4d9d1604e0258cdf62d29cb70c7d63081aa64 Mon Sep 17 00:00:00 2001 From: mricoul Date: Tue, 17 Feb 2026 11:21:17 +0100 Subject: [PATCH 2/5] feat: adds spacing and typography support Adds support for spacing control to the FAQ Answer block, enabling margin, padding, and block gap adjustments. Enables font size control for the FAQ Question block, allowing users to customize the question's typography. --- src/faq-answer/block.json | 7 ++++++- src/faq-question/block.json | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/faq-answer/block.json b/src/faq-answer/block.json index 25e6649..7132ce1 100644 --- a/src/faq-answer/block.json +++ b/src/faq-answer/block.json @@ -10,7 +10,12 @@ "supports": { "html": false, "inserter": false, - "reusable": false + "reusable": false, + "spacing": { + "margin": true, + "padding": true, + "blockGap": true + } }, "attributes": { "isAccordion": { diff --git a/src/faq-question/block.json b/src/faq-question/block.json index 5302b64..f3c09c2 100644 --- a/src/faq-question/block.json +++ b/src/faq-question/block.json @@ -10,7 +10,10 @@ "supports": { "html": false, "inserter": false, - "reusable": false + "reusable": false, + "typography": { + "fontSize": true + } }, "attributes": { "question": { From 42e11ab9cfb224af13f7b2dbb47367bbc9f67d33 Mon Sep 17 00:00:00 2001 From: mricoul Date: Tue, 17 Feb 2026 11:22:04 +0100 Subject: [PATCH 3/5] feat: sanitizes FAQ question text Ensures the question text in the FAQ schema is properly sanitized by stripping all HTML tags. This prevents potential issues with unwanted HTML formatting affecting the schema output and causing unexpected behavior, such as when button blocks are used within FAQ questions. --- includes/schema/faq_schema.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/schema/faq_schema.php b/includes/schema/faq_schema.php index 1c7dd91..839b362 100644 --- a/includes/schema/faq_schema.php +++ b/includes/schema/faq_schema.php @@ -226,7 +226,7 @@ protected function generate_question_block( string $question_text, string $answe '@id' => $url, 'position' => $position, 'url' => $url, - 'name' => esc_html( $question_text ), + 'name' => esc_html( wp_strip_all_tags( $question_text ) ), 'answerCount' => 1, 'acceptedAnswer' => $this->add_accepted_answer_property( $answer_content ), ]; From 85740bacdf7b4b5e4de8cb340d2db422ff16dcc1 Mon Sep 17 00:00:00 2001 From: mricoul Date: Tue, 17 Feb 2026 11:22:15 +0100 Subject: [PATCH 4/5] style(js): format js lint --- src/faq-answer/edit.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/faq-answer/edit.js b/src/faq-answer/edit.js index 3c86d7d..e5ae80b 100644 --- a/src/faq-answer/edit.js +++ b/src/faq-answer/edit.js @@ -4,7 +4,13 @@ import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; -const ALLOWED_BLOCKS = [ 'core/paragraph', 'core/heading', 'core/list', 'core/buttons', 'core/button' ]; +const ALLOWED_BLOCKS = [ + 'core/paragraph', + 'core/heading', + 'core/list', + 'core/buttons', + 'core/button', +]; export default function Edit() { const blockProps = useBlockProps( { From 756376cc3984bc696027d5f4e34ddc0fd1c92e40 Mon Sep 17 00:00:00 2001 From: mricoul Date: Tue, 17 Feb 2026 11:27:16 +0100 Subject: [PATCH 5/5] chore(bump): version --- .plugin-data | 2 +- README.md | 7 +++++++ blockparty-faq.php | 4 ++-- package.json | 2 +- src/faq-answer/block.json | 2 +- src/faq-item/block.json | 2 +- src/faq-question/block.json | 2 +- src/faq/block.json | 2 +- 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.plugin-data b/.plugin-data index af7b08a..a66c5dc 100644 --- a/.plugin-data +++ b/.plugin-data @@ -1,4 +1,4 @@ { - "version": "2.0.2", + "version": "2.0.3", "slug": "blockparty-faq" } diff --git a/README.md b/README.md index b140301..82b886d 100644 --- a/README.md +++ b/README.md @@ -83,3 +83,10 @@ Yoast SEO is required for the FAQ schema (JSON-LD) generation. It is installed a ### 2.0.2 - 2026-01-27 - Add missing isAccordion attribute + +### 2.0.3 - 2026-02-17 + +- Allow adding "Button" blocks in the answer content +- Add spacing support for answers +- Add font size support for the question +- Strip HTML tags from the question in structured data diff --git a/blockparty-faq.php b/blockparty-faq.php index fb78109..a0c11f4 100644 --- a/blockparty-faq.php +++ b/blockparty-faq.php @@ -4,7 +4,7 @@ * Description: A FAQ block for WordPress Editor that provided structured data based on FAQ schema. * Requires at least: 6.2 * Requires PHP: 8.1 - * Version: 2.0.2 + * Version: 2.0.3 * Plugin URI: https://beapi.fr * Author: Be API Technical team * Author URI: https://beapi.fr @@ -41,7 +41,7 @@ } // Plugin constants -define( 'BLOCKPARTY_FAQ_VERSION', '2.0.2' ); +define( 'BLOCKPARTY_FAQ_VERSION', '2.0.3' ); // Plugin URL and PATH define( 'BLOCKPARTY_FAQ_DIR', plugin_dir_path( __FILE__ ) ); diff --git a/package.json b/package.json index 6c764c2..b604620 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockparty-faq", - "version": "2.0.2", + "version": "2.0.3", "description": "SEO friendly FAQ module in an accessible accordion", "author": "Be API Technical team", "license": "GPL-2.0-or-later", diff --git a/src/faq-answer/block.json b/src/faq-answer/block.json index 7132ce1..bf79231 100644 --- a/src/faq-answer/block.json +++ b/src/faq-answer/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "blockparty/faq-answer", - "version": "2.0.2", + "version": "2.0.3", "title": "FAQ Answer", "category": "design", "parent": [ "blockparty/faq-item" ], diff --git a/src/faq-item/block.json b/src/faq-item/block.json index 37c9e1b..a584901 100644 --- a/src/faq-item/block.json +++ b/src/faq-item/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "blockparty/faq-item", - "version": "2.0.2", + "version": "2.0.3", "title": "FAQ Item", "category": "design", "parent": [ "blockparty/faq" ], diff --git a/src/faq-question/block.json b/src/faq-question/block.json index f3c09c2..907f8a1 100644 --- a/src/faq-question/block.json +++ b/src/faq-question/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "blockparty/faq-question", - "version": "2.0.2", + "version": "2.0.3", "title": "FAQ Question", "category": "design", "parent": [ "blockparty/faq-item" ], diff --git a/src/faq/block.json b/src/faq/block.json index 392b0b7..024a625 100644 --- a/src/faq/block.json +++ b/src/faq/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "blockparty/faq", - "version": "2.0.2", + "version": "2.0.3", "title": "FAQ", "category": "design", "description": "A FAQ block for WordPress Editor that provided structured data based on FAQ schema.",