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/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 ), ]; 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 25e6649..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" ], @@ -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-answer/edit.js b/src/faq-answer/edit.js index b76f4cf..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' ]; +const ALLOWED_BLOCKS = [ + 'core/paragraph', + 'core/heading', + 'core/list', + 'core/buttons', + 'core/button', +]; export default function Edit() { const blockProps = useBlockProps( { 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 5302b64..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" ], @@ -10,7 +10,10 @@ "supports": { "html": false, "inserter": false, - "reusable": false + "reusable": false, + "typography": { + "fontSize": true + } }, "attributes": { "question": { 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.",