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
2 changes: 1 addition & 1 deletion .plugin-data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.0.3",
"version": "2.1.0",
"slug": "blockparty-faq"
}
108 changes: 108 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.0] - 2026-06-30

### Added

- Configurable FAQ question heading level (h2–h6) from the block settings panel.
- Rank Math SEO integration for FAQ structured data (JSON-LD).
- SEOPress integration for FAQ structured data (JSON-LD).
- SEO service resolver to delegate schema output to the active SEO plugin (Yoast SEO, Rank Math, or SEOPress).
- PSR-4 autoloading for plugin PHP classes via Composer.
- Block example in the FAQ block inserter preview.
- Deprecated save handlers to preserve front-end markup for content saved in 2.0.x.

### Changed

- Refactored FAQ block markup to use WordPress block class names (aligned with blockparty-accordion).
- Refactored Yoast SEO integration into a dedicated service class alongside other SEO plugins.
- Updated French translations for all block editor scripts.
- Replaced wp-env npm scripts (`start:env` / `stop:env` / `setup:env`) with `env:start` / `env:stop`.
- Local development environment now mounts Yoast SEO, Rank Math, and SEOPress via Composer.

### Fixed

- Removed duplicate block wrapper in the FAQ item editor component (`useBlockProps` called twice).
- Renamed `includes/` subdirectories to match PSR-4 namespace casing (`Schema/`, `Services/`, `Hooks/`).

### Removed

- Psalm static analysis configuration and dependency.

## [2.0.3] - 2026-02-17

### Added

- Support for core/button blocks inside FAQ answers.
- Spacing support for FAQ answers.
- Font size (typography) support for FAQ questions.

### Changed

- FAQ question text is stripped of HTML tags in structured data output.

## [2.0.2] - 2026-01-27

### Fixed

- Added missing `isAccordion` attribute to the parent FAQ block.

## [2.0.1] - 2026-01-27

### Fixed

- Block registration now uses block metadata from `block.json` correctly after the 2.0 build restructure.

## [2.0.0] - 2026-01-27

### Added

- Nested block architecture with child blocks: `faq-item`, `faq-question`, and `faq-answer`.
- Configurable accordion mode via the `isAccordion` attribute (interactive accordion or static layout).
- InnerBlocks support in FAQ answers (paragraphs, lists, images, and other Gutenberg blocks).
- InnerBlocks support in FAQ questions when accordion mode is disabled.
- Front-end accordion script with configurable behavior via the `beapi_faq_block_config` filter.
- Automatic migration from the legacy `questions` array attribute to the InnerBlocks format.
- Add and remove FAQ item controls in the block editor toolbar.
- Full internationalization: PO/MO translations for PHP and JSON translations for JavaScript.
- Yoast SEO FAQPage structured data integration.
- wp-env local development environment.

### Changed

- Build structure reorganized to follow the blockparty-accordion model (one `block.json` per block directory).

## [1.0.2] - 2024-06-07

### Changed

- Added PHP 8.2 to supported PHP versions.

## [1.0.1] - 2024-04-03

### Fixed

- Corrected CSS custom property variable names.

## [1.0.0] - 2024-04-02

### Added

- Initial release of the Blockparty FAQ Gutenberg block.
- Accessible accordion front-end behavior powered by `@beapi/be-a11y`.
- Yoast SEO FAQPage structured data (JSON-LD) generation.
- Editor controls to add and remove FAQ items.

[2.1.0]: https://github.com/BeAPI/blockparty-faq/compare/2.0.3...2.1.0
[2.0.3]: https://github.com/BeAPI/blockparty-faq/compare/2.0.2...2.0.3
[2.0.2]: https://github.com/BeAPI/blockparty-faq/compare/2.0.1...2.0.2
[2.0.1]: https://github.com/BeAPI/blockparty-faq/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/BeAPI/blockparty-faq/compare/1.0.2...2.0.0
[1.0.2]: https://github.com/BeAPI/blockparty-faq/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/BeAPI/blockparty-faq/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/BeAPI/blockparty-faq/releases/tag/1.0.0
4 changes: 2 additions & 2 deletions blockparty-faq.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.3
* Version: 2.1.0
* Plugin URI: https://beapi.fr
* Author: Be API Technical team
* Author URI: https://beapi.fr
Expand Down Expand Up @@ -45,7 +45,7 @@
}

// Plugin constants
define( 'BLOCKPARTY_FAQ_VERSION', '2.0.3' );
define( 'BLOCKPARTY_FAQ_VERSION', '2.1.0' );

// Plugin URL and PATH
define( 'BLOCKPARTY_FAQ_DIR', plugin_dir_path( __FILE__ ) );
Expand Down
2 changes: 1 addition & 1 deletion languages/blockparty-faq.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is distributed under the GPL-2.0-or-later.
msgid ""
msgstr ""
"Project-Id-Version: Blockparty FAQ 2.0.3\n"
"Project-Id-Version: Blockparty FAQ 2.1.0\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"
Expand Down
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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockparty-faq",
"version": "2.0.3",
"version": "2.1.0",
"description": "SEO friendly FAQ module in an accessible accordion",
"author": "Be API Technical team",
"license": "GPL-2.0-or-later",
Expand Down
113 changes: 113 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
=== Blockparty FAQ ===
Contributors: beapi
Tags: block, faq, accordion, gutenberg, schema, seo, accessibility
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 8.1
Stable tag: 2.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A Gutenberg FAQ block with accessible accordion behavior and SEO-friendly structured data.

== Description ==

Blockparty FAQ provides a nested Gutenberg block for building frequently asked questions pages. Each FAQ entry is composed of a question and a rich-text answer that can contain any supported inner blocks (paragraphs, lists, images, buttons, and more).

**Key features:**

* Accessible accordion on the front end, powered by `@beapi/be-a11y`.
* Toggle between accordion and static display modes.
* Configurable question heading level (h2–h6).
* Nested block architecture: FAQ → FAQ Item → Question + Answer.
* FAQPage structured data (JSON-LD) via Yoast SEO, Rank Math, or SEOPress.
* Automatic migration from the legacy single-block format (pre-2.0).
* Full editor internationalization (JavaScript JSON translations and PHP PO/MO files).

**SEO plugins**

FAQ structured data requires one of the following SEO plugins to be active:

* Yoast SEO
* Rank Math
* SEOPress

Only one SEO plugin should be active at a time. The plugin automatically detects which one is available and outputs the appropriate schema.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/blockparty-faq` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Install and activate Yoast SEO, Rank Math, or SEOPress if you need FAQ structured data output.
4. Insert the **FAQ** block from the block inserter in the WordPress editor.

== Frequently Asked Questions ==

= Does this block work without an SEO plugin? =

Yes. The FAQ block renders correctly on the front end without any SEO plugin. Structured data (JSON-LD) output requires Yoast SEO, Rank Math, or SEOPress.

= Can I use multiple FAQ blocks on the same page? =

Yes. All FAQ blocks on a page are aggregated into a single FAQPage schema entry.

= Is the accordion accessible? =

Yes. The front-end accordion uses `@beapi/be-a11y` with proper ARIA attributes (`aria-expanded`, `role="region"`) and keyboard support.

== Changelog ==

= 2.1.0 - 2026-06-30 =
* Added configurable FAQ question heading level (h2–h6).
* Added Rank Math SEO integration for FAQ structured data.
* Added SEOPress integration for FAQ structured data.
* Added SEO service resolver to delegate schema output to the active SEO plugin.
* Added PSR-4 autoloading for plugin PHP classes.
* Added block inserter example preview for the FAQ block.
* Added deprecated save handlers for content saved in 2.0.x.
* Changed FAQ block markup to WordPress block class names (aligned with blockparty-accordion).
* Changed Yoast SEO integration into a dedicated service class.
* Changed wp-env npm scripts to `env:start` / `env:stop`.
* Fixed duplicate block wrapper in the FAQ item editor component.
* Fixed PSR-4 directory casing for Composer autoloading.
* Removed Psalm static analysis.

= 2.0.3 - 2026-02-17 =
* Added support for core/button blocks in FAQ answers.
* Added spacing support for FAQ answers.
* Added font size support for FAQ questions.
* Changed FAQ question text to strip HTML tags in structured data.

= 2.0.2 - 2026-01-27 =
* Fixed missing `isAccordion` attribute on the parent FAQ block.

= 2.0.1 - 2026-01-27 =
* Fixed block registration to use block metadata after the 2.0 build restructure.

= 2.0.0 - 2026-01-27 =
* Added nested block architecture (`faq-item`, `faq-question`, `faq-answer`).
* Added configurable accordion mode (`isAccordion` attribute).
* Added InnerBlocks support in FAQ answers and questions.
* Added front-end accordion script with `beapi_faq_block_config` filter.
* Added automatic migration from the legacy `questions` array format.
* Added add/remove FAQ item controls in the block editor.
* Added full internationalization (PO/MO and JSON translations).
* Added Yoast SEO FAQPage structured data integration.
* Changed build structure to one `block.json` per block directory.

= 1.0.2 - 2024-06-07 =
* Added PHP 8.2 to supported PHP versions.

= 1.0.1 - 2024-04-03 =
* Fixed CSS custom property variable names.

= 1.0.0 - 2024-04-02 =
* Initial release with accessible accordion and Yoast SEO FAQPage structured data.

== Upgrade Notice ==

= 2.1.0 =
Adds Rank Math and SEOPress support, configurable question heading levels, and updated block markup. Existing content is preserved via deprecated save handlers.

= 2.0.0 =
Major block architecture change. Existing FAQ blocks are automatically migrated to the new nested format on save.
2 changes: 1 addition & 1 deletion src/faq-answer/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "blockparty/faq-answer",
"version": "2.0.3",
"version": "2.1.0",
"title": "FAQ Answer",
"category": "design",
"parent": [ "blockparty/faq-item" ],
Expand Down
2 changes: 1 addition & 1 deletion src/faq-item/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "blockparty/faq-item",
"version": "2.0.3",
"version": "2.1.0",
"title": "FAQ Item",
"category": "design",
"parent": [ "blockparty/faq" ],
Expand Down
2 changes: 1 addition & 1 deletion src/faq-question/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "blockparty/faq-question",
"version": "2.0.3",
"version": "2.1.0",
"title": "FAQ Question",
"category": "design",
"parent": [ "blockparty/faq-item" ],
Expand Down
2 changes: 1 addition & 1 deletion src/faq/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "blockparty/faq",
"version": "2.0.3",
"version": "2.1.0",
"title": "FAQ",
"category": "design",
"description": "A FAQ block for WordPress Editor that provided structured data based on FAQ schema.",
Expand Down
Loading