Skip to content

Add inner blocks#11

Merged
firestar300 merged 7 commits intodevelopfrom
feature/allow-innerblocks
Jan 26, 2026
Merged

Add inner blocks#11
firestar300 merged 7 commits intodevelopfrom
feature/allow-innerblocks

Conversation

@firestar300
Copy link
Copy Markdown
Contributor

Description

  • Possibilité d'ajouter des blocs dans le bloc FAQ
  • Option pour activer ou désactiver le markup HTML Accordéon friendly (défaut: true)
  • Récupération du contenu des questions / réponses pour les insérer dans les données structurées

Migrates the FAQ block to utilize InnerBlocks for improved content structure and editing experience.

This change replaces the previous attribute-based approach with dedicated `faq-item`, `faq-question`, and `faq-answer` blocks, offering better control and flexibility.

Also includes schema generation and support for PHP versions up to 8.4.
Migrates the FAQ block to use inner blocks for managing questions and answers, allowing for greater flexibility and content structure.

Adds a migration script to convert existing FAQ blocks from the old `questions` array format to the new inner blocks format.

Includes deprecated block configuration to handle the migration process smoothly.
Enables inner blocks for FAQ question, allowing richer content within the question.

Handles conversion between accordion and non-accordion states:
- When switching to non-accordion, moves question text to a heading block.
- When switching to accordion, extracts content from the first inner block and sets it as the question text.
Moves the FAQ block's structure to leverage build artifacts and enhances its functionality.

This includes:
- Registers block types from build directory for better organization.
- Introduces `wp_localize_script` to pass configuration from PHP to the view script.
- Implements Javascript translations for block editor.
- Adds `@beapi/be-a11y` for accessibility improvements, enabling accordion functionality.
@firestar300 firestar300 merged commit 1c5946c into develop Jan 26, 2026
@firestar300 firestar300 deleted the feature/allow-innerblocks branch January 26, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant