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: 2 additions & 0 deletions .github/workflows/quality-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
pull_request:
paths:
- 'src/**'
- 'package.json'
push:
paths:
- 'src/**'
- 'package.json'
branches:
- main

Expand Down
2 changes: 1 addition & 1 deletion .plugin-data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "1.1.0",
"version": "1.2.0",
"slug": "blockparty-accordion"
}
36 changes: 36 additions & 0 deletions .wordpress-org/blueprints/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/blockparty-accordion-demo/",
"preferredVersions": {
"php": "8.1",
"wp": "latest"
},
"steps": [
{
"step": "installPlugin",
"pluginData": {
"resource": "git:directory",
"url": "https://github.com/BeAPI/blockparty-accordion",
"ref": "1.2.0",
"refType": "tag"
},
"options": {
"activate": true,
"targetFolderName": "blockparty-accordion"
}
},
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "runPHP",
"code": "<?php\nrequire_once 'wordpress/wp-load.php';\n$dir = WP_CONTENT_DIR . '/mu-plugins';\nif ( ! is_dir( $dir ) ) {\n\twp_mkdir_p( $dir );\n}\n$file = $dir . '/blockparty-accordion-playground-kses.php';\n$mu_plugin = <<<'MUPLUGIN_EOF'\n<?php\n/**\n * WordPress Playground: extend KSES for Blockparty Accordion saved markup.\n */\nadd_filter( 'wp_kses_allowed_html', function( $tags, $context ) {\n\tif ( 'post' !== $context ) {\n\t\treturn $tags;\n\t}\n\n\tif ( ! isset( $tags['button'] ) ) {\n\t\t$tags['button'] = array();\n\t}\n\t$tags['button']['aria-expanded'] = true;\n\t$tags['button']['class'] = true;\n\n\tif ( ! isset( $tags['div'] ) ) {\n\t\t$tags['div'] = array();\n\t}\n\t$tags['div']['role'] = true;\n\t$tags['div']['style'] = true;\n\t$tags['div']['aria-hidden'] = true;\n\t$tags['div']['data-first-item-open-by-default'] = true;\n\n\tif ( ! isset( $tags['h3'] ) ) {\n\t\t$tags['h3'] = array();\n\t}\n\t$tags['h3']['class'] = true;\n\n\tif ( ! isset( $tags['span'] ) ) {\n\t\t$tags['span'] = array();\n\t}\n\t$tags['span']['class'] = true;\n\n\tif ( ! isset( $tags['a'] ) ) {\n\t\t$tags['a'] = array();\n\t}\n\t$tags['a']['href'] = true;\n\t$tags['a']['data-type'] = true;\n\t$tags['a']['data-id'] = true;\n\n\tif ( ! isset( $tags['sup'] ) ) {\n\t\t$tags['sup'] = array();\n\t}\n\t$tags['sup']['class'] = true;\n\n\treturn $tags;\n}, 10, 2 );\nMUPLUGIN_EOF;\nfile_put_contents( $file, $mu_plugin );\necho file_exists( $file ) ? 'mu-plugin installed' : 'mu-plugin failed';\n"
},
{
"step": "runPHP",
"code": "<?php\nrequire_once 'wordpress/wp-load.php';\n$page_content = <<<'BLOCKPARTY_ACCORDION_MARKUP_EOF'\n<!-- wp:blockparty/accordion -->\n<div class=\"wp-block-blockparty-accordion\"><!-- wp:blockparty/accordion-item -->\n<div class=\"wp-block-blockparty-accordion-item\"><!-- wp:blockparty/accordion-summary {\"label\":\"Johannes Gutenberg\"} -->\n<h3 class=\"wp-block-blockparty-accordion-summary\"><button aria-expanded=\"false\" class=\"wp-block-blockparty-accordion-trigger\"><span class=\"wp-block-blockparty-accordion-title\">Johannes Gutenberg</span></button></h3>\n<!-- /wp:blockparty/accordion-summary -->\n\n<!-- wp:blockparty/accordion-panel -->\n<div role=\"region\" class=\"wp-block-blockparty-accordion-panel\"><div class=\"wp-block-blockparty-accordion-panel__inner\"><!-- wp:paragraph -->\n<p><em>\"Gutenberg\" redirects here. For the Bible, see&nbsp;</em><a href=\"https://en.wikipedia.org/wiki/Gutenberg_Bible\">Gutenberg Bible</a><em>. For other uses, see&nbsp;</em><a href=\"https://en.wikipedia.org/wiki/Gutenberg_(disambiguation)\">Gutenberg (disambiguation)</a><em>.</em></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:spacer {\"height\":\"var:preset|spacing|40\"} -->\n<div style=\"height:var(--wp--preset--spacing--40)\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:paragraph -->\n<p><strong>Johannes Gensfleisch zur Laden zum Gutenberg</strong>&nbsp;(c. 1393–1406&nbsp;– 3 February 1468) was a German inventor and&nbsp;<a href=\"https://en.wikipedia.org/wiki/Artisan\">craftsman</a>&nbsp;who invented the movable-type&nbsp;<a href=\"https://en.wikipedia.org/wiki/Printing_press\">printing press</a>. Though&nbsp;<a href=\"https://en.wikipedia.org/wiki/Movable_type\">movable type</a>&nbsp;was already in use in East Asia, Gutenberg's invention of the printing press&nbsp;enabled a much faster rate of&nbsp;<a href=\"https://en.wikipedia.org/wiki/Printing\">printing</a>. The printing press later&nbsp;<a href=\"https://en.wikipedia.org/wiki/Global_spread_of_the_printing_press\">spread across the world</a>,&nbsp;and led to an&nbsp;<a href=\"https://en.wikipedia.org/wiki/Information_revolution\">information revolution</a>&nbsp;and the unprecedented mass-spread of literature throughout Europe. It had a profound impact on the development of the&nbsp;<a href=\"https://en.wikipedia.org/wiki/Renaissance\">Renaissance</a>,&nbsp;<a href=\"https://en.wikipedia.org/wiki/Reformation\">Reformation</a>, and&nbsp;<a href=\"https://en.wikipedia.org/wiki/Humanist\">humanist</a>&nbsp;movements.</p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:blockparty/accordion-panel --></div>\n<!-- /wp:blockparty/accordion-item -->\n\n<!-- wp:blockparty/accordion-item -->\n<div class=\"wp-block-blockparty-accordion-item\"><!-- wp:blockparty/accordion-summary {\"label\":\"Life and career\"} -->\n<h3 class=\"wp-block-blockparty-accordion-summary\"><button aria-expanded=\"false\" class=\"wp-block-blockparty-accordion-trigger\"><span class=\"wp-block-blockparty-accordion-title\">Life and career</span></button></h3>\n<!-- /wp:blockparty/accordion-summary -->\n\n<!-- wp:blockparty/accordion-panel -->\n<div role=\"region\" class=\"wp-block-blockparty-accordion-panel\"><div class=\"wp-block-blockparty-accordion-panel__inner\"><!-- wp:paragraph -->\n<p>Johannes Gutenberg was born in&nbsp;<a href=\"https://en.wikipedia.org/wiki/Electorate_of_Mainz\">Mainz</a>&nbsp;(in modern-day Germany), a wealthy city along the&nbsp;<a href=\"https://en.wikipedia.org/wiki/Rhine\">Rhine</a>, between the 14th and 15th centuries.&nbsp;His exact year of birth is unknown; on the basis of a later document indicating that he came of age by 1420, scholarly estimates have ranged from 1393 to 1406. The year 1400 is commonly assigned to Gutenberg, \"for the sake of convenience\". Tradition also holds his birthdate to be on the&nbsp;<a href=\"https://en.wikipedia.org/wiki/Nativity_of_Saint_John_the_Baptist\">feast day of Saint John the Baptist</a>, 24 June, since children of the time were often named after their birthday's&nbsp;<a href=\"https://en.wikipedia.org/wiki/Patron_saint\">patron saint</a>. There is no verification for this assumption, since the name \"Johannes\"—and variants such as \"Johann\", \"Henne\", \"Hengin\" and \"Henchen\"—was widely popular at the time.&nbsp;In full, Gutenberg's name was \"Johannes Gensfleisch zur Laden zum Gutenberg\", with \"Laden\" and \"Gutenberg\" being adopted from the family's residences in Mainz.The latter refers to the&nbsp;<em>Hof zum Gutenberg</em>, a large and now destroyed&nbsp;<a href=\"https://en.wikipedia.org/wiki/Gothic_architecture\">Gothic</a>-style residence inherited by Gutenberg's father.&nbsp;Gutenberg probably spent his earliest years at the manor, which existed beside&nbsp;<a href=\"https://en.wikipedia.org/wiki/St._Christoph%27s_Church,_Mainz\">St. Christoph's</a>.</p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:blockparty/accordion-panel --></div>\n<!-- /wp:blockparty/accordion-item -->\n\n<!-- wp:blockparty/accordion-item -->\n<div class=\"wp-block-blockparty-accordion-item\"><!-- wp:blockparty/accordion-summary {\"label\":\"Legacy\"} -->\n<h3 class=\"wp-block-blockparty-accordion-summary\"><button aria-expanded=\"false\" class=\"wp-block-blockparty-accordion-trigger\"><span class=\"wp-block-blockparty-accordion-title\">Legacy</span></button></h3>\n<!-- /wp:blockparty/accordion-summary -->\n\n<!-- wp:blockparty/accordion-panel -->\n<div role=\"region\" class=\"wp-block-blockparty-accordion-panel\"><div class=\"wp-block-blockparty-accordion-panel__inner\"><!-- wp:paragraph -->\n<p>Gutenberg's invention had an enormous impact on subsequent&nbsp;<a href=\"https://en.wikipedia.org/wiki/Human_history\">human history</a>, both on cultural and social matters.&nbsp;His design directly impacted the mass spread of books across Europe, causing an information revolution<sup><a href=\"https://en.wikipedia.org/wiki/Johannes_Gutenberg#cite_note-FOOTNOTELehmann-Haupt2020%C2%A7_%22Introduction_&amp;_Top_Questions%22-71\">.</a></sup>&nbsp;As a result, Venzke describes the inauguration of the&nbsp;<a href=\"https://en.wikipedia.org/wiki/Renaissance\">Renaissance</a>,&nbsp;<a href=\"https://en.wikipedia.org/wiki/Reformation\">Reformation</a>&nbsp;and&nbsp;<a href=\"https://en.wikipedia.org/wiki/Humanism\">humanist</a>&nbsp;movement as \"unthinkable\" without Gutenberg's influence.&nbsp;Described as \"one of the most recognized names in the world\",&nbsp;a team of US journalists voted Gutenberg as the \"man of the millennium\" in 1999.&nbsp;Similarly, in 1999 the&nbsp;<a href=\"https://en.wikipedia.org/wiki/A%26E_Network\">A&amp;E Network</a>&nbsp;ranked Gutenberg the No. 1 most influential person of the second millennium on their \"Biographies of the Millennium\" countdown, while&nbsp;<em><a href=\"https://en.wikipedia.org/wiki/Time%E2%80%93Life\">Time–Life</a></em>&nbsp;magazine picked Gutenberg's invention as the most important of the second millennium in 1997.&nbsp;The scholar of paper history,&nbsp;<a href=\"https://en.wikipedia.org/wiki/Thomas_Francis_Carter\">Thomas Francis Carter</a>, drew parallels between&nbsp;<a href=\"https://en.wikipedia.org/wiki/Cai_Lun\">Cai Lun</a>, the traditional inventor of paper during the&nbsp;<a href=\"https://en.wikipedia.org/wiki/Eastern_Han_dynasty\">Eastern Han dynasty</a>, and Gutenberg, calling them \"spiritual father and son\" respectively. In his 1978 book,&nbsp;<em><a href=\"https://en.wikipedia.org/wiki/The_100:_A_Ranking_of_the_Most_Influential_Persons_in_History\">The 100: A Ranking of the Most Influential Persons in History</a></em>,&nbsp;<a href=\"https://en.wikipedia.org/wiki/Michael_H._Hart\">Michael H. Hart</a>&nbsp;ranked him 8th, below Cai but above figures such as&nbsp;<a href=\"https://en.wikipedia.org/wiki/Christopher_Columbus\">Christopher Columbus</a>,&nbsp;<a href=\"https://en.wikipedia.org/wiki/Albert_Einstein\">Albert Einstein</a>&nbsp;and&nbsp;<a href=\"https://en.wikipedia.org/wiki/Charles_Darwin\">Charles Darwin</a>.</p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:blockparty/accordion-panel --></div>\n<!-- /wp:blockparty/accordion-item --></div>\n<!-- /wp:blockparty/accordion -->\n\n<!-- wp:paragraph {\"align\":\"right\",\"style\":{\"spacing\":{\"margin\":{\"top\":\"var:preset|spacing|40\",\"bottom\":\"var:preset|spacing|40\"}}},\"fontSize\":\"small\"} -->\n<p class=\"has-text-align-right has-small-font-size\" style=\"margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)\">Source : <a href=\"https://en.wikipedia.org/wiki/Johannes_Gutenberg#Life_and_career\" data-type=\"link\" data-id=\"https://en.wikipedia.org/wiki/Johannes_Gutenberg#Life_and_career\">Wikipedia</a></p>\n<!-- /wp:paragraph -->\nBLOCKPARTY_ACCORDION_MARKUP_EOF;\n\n$page_id = wp_insert_post(\n\tarray(\n\t\t'post_title' => 'Blockparty Accordion',\n\t\t'post_name' => 'blockparty-accordion-demo',\n\t\t'post_content' => $page_content,\n\t\t'post_status' => 'publish',\n\t\t'post_type' => 'page',\n\t)\n);\necho 'Page created with ID: ' . $page_id;\n?>\n"
}
]
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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).

## 1.2.0 - 2026-04-21

- Clarify block inserter descriptions; refresh French translations (POT, PO, MO, and Jed JSON)
- Add WordPress Playground blueprint and README badge for the plugin directory
- Update block icons (`@beapi/icons`, `@wordpress/icons`) and block entry scripts
- Developer tooling: Volta Node pin; add `@typescript-eslint` packages for ESLint; run JS quality workflow when `package.json` changes

## 1.1.0 - 2026-02-18

- Support for `blockparty/icons` block
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Blockparty Accordion

[![Test with WordPress Playground](https://img.shields.io/badge/Test%20with-WordPress%20Playground-0073aa?style=for-the-badge&logo=wordpress&logoColor=white)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/beapi/blockparty-accordion/refs/heads/main/.wordpress-org/blueprints/blueprint.json)

## Filters

Use `beapi_accordion_block_config` filter to override accordion config from your theme or plugin.
Expand Down
4 changes: 2 additions & 2 deletions blockparty-accordion.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Accessible Accordion block for WordPress editor.
* Requires at least: 6.2
* Requires PHP: 8.1
* Version: 1.1.0
* Version: 1.2.0
* Author: Be API Technical team
* Author URI: https://beapi.fr
* License: GPL-2.0-or-later
Expand All @@ -15,7 +15,7 @@

namespace Blockparty\Accordion;

define( 'BLOCKPARTY_ACCORDION_VERSION', '1.1.0' );
define( 'BLOCKPARTY_ACCORDION_VERSION', '1.2.0' );
define( 'BLOCKPARTY_ACCORDION_URL', plugin_dir_url( __FILE__ ) );
define( 'BLOCKPARTY_ACCORDION_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLOCKPARTY_ACCORDION_PLUGIN_DIRNAME', plugin_basename( __FILE__ ) );
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"2026-02-09 10:51+0100","generator":"WP-CLI\/2.12.0","source":"build\/blockparty-accordion\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=(n != 1);"},"Accordion options":["Options de l\u2019accord\u00e9on"],"Open first item by default":["Ouvrir le premier \u00e9l\u00e9ment par d\u00e9faut"]}}}
{"translation-revision-date":"2026-04-21 19:07+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-accordion\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=(n != 1);"},"Accordion options":["Options de l\u2019accord\u00e9on"],"Open first item by default":["Ouvrir le premier \u00e9l\u00e9ment par d\u00e9faut"]}}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"2026-02-09 10:51+0100","generator":"WP-CLI\/2.12.0","source":"build\/blockparty-accordion-summary\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=(n != 1);"},"Icon":["Ic\u00f4ne"],"Summary\u2026":["Titre\u2026"]}}}
{"translation-revision-date":"2026-04-21 19:07+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-accordion-summary\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=(n != 1);"},"Icon":["Ic\u00f4ne"],"Summary\u2026":["Titre\u2026"]}}}
Binary file modified languages/blockparty-accordion-fr_FR.mo
Binary file not shown.
30 changes: 19 additions & 11 deletions languages/blockparty-accordion-fr_FR.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ msgstr ""
"Project-Id-Version: Blockparty Accordion 1.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-"
"accordion\n"
"POT-Creation-Date: 2026-02-09T09:49:54+00:00\n"
"PO-Revision-Date: 2026-02-09 10:51+0100\n"
"POT-Creation-Date: 2026-04-21T17:06:51+00:00\n"
"PO-Revision-Date: 2026-04-21 19:07+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.1.1\n"
"X-Generator: Poedit 3.8\n"
"X-Domain: blockparty-accordion\n"

#. Plugin Name of the plugin
Expand Down Expand Up @@ -59,8 +59,8 @@ msgstr "Élément"

#: build/blockparty-accordion-item/block.json
msgctxt "block description"
msgid "Accessible accordion block item."
msgstr "Bloc Accordéon Item Accessible."
msgid "Element of the accordion block."
msgstr "Élément du bloc accordéon."

#: build/blockparty-accordion-panel/block.json
msgctxt "block title"
Expand All @@ -69,8 +69,8 @@ msgstr "Panneau"

#: build/blockparty-accordion-panel/block.json
msgctxt "block description"
msgid "Accessible accordion block panel."
msgstr "Bloc Accordéon Panneau Accessible."
msgid "Contains the hidden or revealed content of the accordion item."
msgstr "Contient le contenu affiché ou masqué de l’élément d’accordéon."

#: build/blockparty-accordion-summary/block.json
msgctxt "block title"
Expand All @@ -79,8 +79,8 @@ msgstr "Titre"

#: build/blockparty-accordion-summary/block.json
msgctxt "block description"
msgid "Accessible accordion block summary."
msgstr "Bloc Accordéon Titre Accessible."
msgid "Title of the accordion item."
msgstr "Titre de l’élément d’accordéon."

#: build/blockparty-accordion/block.json
msgctxt "block title"
Expand All @@ -89,5 +89,13 @@ msgstr "Accordéon"

#: build/blockparty-accordion/block.json
msgctxt "block description"
msgid "Accessible accordion block."
msgstr "Bloc Accordéon Titre Accessible."
msgid "Display a list of elements that can be expanded and collapsed."
msgstr "Affiche une liste d’éléments qui peuvent être dépliés et repliés."

#~ msgctxt "block description"
#~ msgid "Accessible accordion block panel."
#~ msgstr "Bloc Accordéon Panneau Accessible."

#~ msgctxt "block description"
#~ msgid "Accessible accordion block summary."
#~ msgstr "Bloc Accordéon Titre Accessible."
14 changes: 7 additions & 7 deletions languages/blockparty-accordion.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# This file is distributed under the GPL-2.0-or-later.
msgid ""
msgstr ""
"Project-Id-Version: Blockparty Accordion 1.0.9\n"
"Project-Id-Version: Blockparty Accordion 1.1.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-accordion\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2026-02-09T12:01:20+00:00\n"
"POT-Creation-Date: 2026-04-21T17:06:51+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.12.0\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: blockparty-accordion\n"

#. Plugin Name of the plugin
Expand Down Expand Up @@ -57,7 +57,7 @@ msgstr ""

#: build/blockparty-accordion-item/block.json
msgctxt "block description"
msgid "Accessible accordion block item."
msgid "Element of the accordion block."
msgstr ""

#: build/blockparty-accordion-panel/block.json
Expand All @@ -67,7 +67,7 @@ msgstr ""

#: build/blockparty-accordion-panel/block.json
msgctxt "block description"
msgid "Accessible accordion block panel."
msgid "Contains the hidden or revealed content of the accordion item."
msgstr ""

#: build/blockparty-accordion-summary/block.json
Expand All @@ -77,7 +77,7 @@ msgstr ""

#: build/blockparty-accordion-summary/block.json
msgctxt "block description"
msgid "Accessible accordion block summary."
msgid "Title of the accordion item."
msgstr ""

#: build/blockparty-accordion/block.json
Expand All @@ -87,5 +87,5 @@ msgstr ""

#: build/blockparty-accordion/block.json
msgctxt "block description"
msgid "Accessible accordion block."
msgid "Display a list of elements that can be expanded and collapsed."
msgstr ""
Loading
Loading