Skip to content

Commit 0c054b6

Browse files
authored
Merge pull request #23 from BeAPI/ver/2.0.3
Release 2.0.3
2 parents 149984b + 756376c commit 0c054b6

10 files changed

Lines changed: 33 additions & 12 deletions

File tree

.plugin-data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"version": "2.0.2",
2+
"version": "2.0.3",
33
"slug": "blockparty-faq"
44
}

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,10 @@ Yoast SEO is required for the FAQ schema (JSON-LD) generation. It is installed a
8383
### 2.0.2 - 2026-01-27
8484

8585
- Add missing isAccordion attribute
86+
87+
### 2.0.3 - 2026-02-17
88+
89+
- Allow adding "Button" blocks in the answer content
90+
- Add spacing support for answers
91+
- Add font size support for the question
92+
- Strip HTML tags from the question in structured data

blockparty-faq.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Description: A FAQ block for WordPress Editor that provided structured data based on FAQ schema.
55
* Requires at least: 6.2
66
* Requires PHP: 8.1
7-
* Version: 2.0.2
7+
* Version: 2.0.3
88
* Plugin URI: https://beapi.fr
99
* Author: Be API Technical team
1010
* Author URI: https://beapi.fr
@@ -41,7 +41,7 @@
4141
}
4242

4343
// Plugin constants
44-
define( 'BLOCKPARTY_FAQ_VERSION', '2.0.2' );
44+
define( 'BLOCKPARTY_FAQ_VERSION', '2.0.3' );
4545

4646
// Plugin URL and PATH
4747
define( 'BLOCKPARTY_FAQ_DIR', plugin_dir_path( __FILE__ ) );

includes/schema/faq_schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ protected function generate_question_block( string $question_text, string $answe
226226
'@id' => $url,
227227
'position' => $position,
228228
'url' => $url,
229-
'name' => esc_html( $question_text ),
229+
'name' => esc_html( wp_strip_all_tags( $question_text ) ),
230230
'answerCount' => 1,
231231
'acceptedAnswer' => $this->add_accepted_answer_property( $answer_content ),
232232
];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blockparty-faq",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "SEO friendly FAQ module in an accessible accordion",
55
"author": "Be API Technical team",
66
"license": "GPL-2.0-or-later",

src/faq-answer/block.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 3,
44
"name": "blockparty/faq-answer",
5-
"version": "2.0.2",
5+
"version": "2.0.3",
66
"title": "FAQ Answer",
77
"category": "design",
88
"parent": [ "blockparty/faq-item" ],
99
"description": "Content of the FAQ answer.",
1010
"supports": {
1111
"html": false,
1212
"inserter": false,
13-
"reusable": false
13+
"reusable": false,
14+
"spacing": {
15+
"margin": true,
16+
"padding": true,
17+
"blockGap": true
18+
}
1419
},
1520
"attributes": {
1621
"isAccordion": {

src/faq-answer/edit.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
import { useBlockProps, InnerBlocks } from '@wordpress/block-editor';
55
import { __ } from '@wordpress/i18n';
66

7-
const ALLOWED_BLOCKS = [ 'core/paragraph', 'core/heading', 'core/list' ];
7+
const ALLOWED_BLOCKS = [
8+
'core/paragraph',
9+
'core/heading',
10+
'core/list',
11+
'core/buttons',
12+
'core/button',
13+
];
814

915
export default function Edit() {
1016
const blockProps = useBlockProps( {

src/faq-item/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 3,
44
"name": "blockparty/faq-item",
5-
"version": "2.0.2",
5+
"version": "2.0.3",
66
"title": "FAQ Item",
77
"category": "design",
88
"parent": [ "blockparty/faq" ],

src/faq-question/block.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 3,
44
"name": "blockparty/faq-question",
5-
"version": "2.0.2",
5+
"version": "2.0.3",
66
"title": "FAQ Question",
77
"category": "design",
88
"parent": [ "blockparty/faq-item" ],
99
"description": "Content of the FAQ question.",
1010
"supports": {
1111
"html": false,
1212
"inserter": false,
13-
"reusable": false
13+
"reusable": false,
14+
"typography": {
15+
"fontSize": true
16+
}
1417
},
1518
"attributes": {
1619
"question": {

src/faq/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 3,
44
"name": "blockparty/faq",
5-
"version": "2.0.2",
5+
"version": "2.0.3",
66
"title": "FAQ",
77
"category": "design",
88
"description": "A FAQ block for WordPress Editor that provided structured data based on FAQ schema.",

0 commit comments

Comments
 (0)