Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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": "1.1.0",
"version": "1.1.1",
"slug": "blockparty-tabs"
}
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-tabs-demo/",
"preferredVersions": {
"php": "8.1",
"wp": "latest"
},
"steps": [
{
"step": "installPlugin",
"pluginData": {
"resource": "git:directory",
"url": "https://github.com/BeAPI/blockparty-tabs",
"ref": "1.1.1",
"refType": "tag"
},
"options": {
"activate": true,
"targetFolderName": "blockparty-tabs"
}
},
{
"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-tabs-playground-kses.php';\n$mu_plugin = <<<'MUPLUGIN_EOF'\n<?php\nadd_filter( 'wp_kses_allowed_html', function( $tags, $context ) {\n\tif ( 'post' !== $context ) {\n\t\treturn $tags;\n\t}\n\tif ( ! isset( $tags['button'] ) ) {\n\t\t$tags['button'] = array();\n\t}\n\t$tags['button']['aria-expanded'] = true;\n\tif ( ! isset( $tags['div'] ) ) {\n\t\t$tags['div'] = array();\n\t}\n\t$tags['div']['tabindex'] = true;\n\t$tags['div']['role'] = true;\n\t$tags['div']['aria-labelledby'] = true;\n\t$tags['div']['aria-label'] = true;\n\t$tags['div']['style'] = true;\n\tif ( ! isset( $tags['a'] ) ) {\n\t\t$tags['a'] = array();\n\t}\n\t$tags['a']['id'] = true;\n\t$tags['a']['role'] = true;\n\t$tags['a']['aria-controls'] = true;\n\t$tags['a']['aria-selected'] = true;\n\t$tags['a']['tabindex'] = true;\n\t$tags['a']['data-type'] = true;\n\t$tags['a']['data-id'] = true;\n\tif ( ! isset( $tags['sup'] ) ) {\n\t\t$tags['sup'] = array();\n\t}\n\t$tags['sup']['class'] = true;\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_TABS_MARKUP_EOF'\n<!-- wp:blockparty/tabs {\"tabsActive\":2} -->\n<div class=\"wp-block-blockparty-tabs has-align-top-left\" aria-label=\"\" role=\"tablist\"><!-- wp:blockparty/tabs-nav -->\n<ul class=\"wp-block-blockparty-tabs-nav\"><!-- wp:blockparty/tabs-nav-item {\"label\":\"Johannes Gutenberg\",\"linkId\":\"block-tab-0-0\",\"panelId\":\"block-panel-0-0\",\"index\":0,\"lock\":{\"move\":true,\"remove\":true}} -->\n<li class=\"wp-block-blockparty-tabs-nav-item\"><a id=\"block-tab-0-0\" role=\"tab\" aria-controls=\"block-panel-0-0\" class=\"wp-block-blockparty-tabs-nav-link\" href=\"#block-tab-0-0\"><span>Johannes Gutenberg</span></a></li>\n<!-- /wp:blockparty/tabs-nav-item -->\n\n<!-- wp:blockparty/tabs-nav-item {\"label\":\"Life and career\",\"linkId\":\"block-tab-0-1\",\"panelId\":\"block-panel-0-1\",\"index\":1,\"lock\":{\"move\":true,\"remove\":true}} -->\n<li class=\"wp-block-blockparty-tabs-nav-item\"><a id=\"block-tab-0-1\" role=\"tab\" aria-controls=\"block-panel-0-1\" class=\"wp-block-blockparty-tabs-nav-link\" href=\"#block-tab-0-1\"><span>Life and career</span></a></li>\n<!-- /wp:blockparty/tabs-nav-item -->\n\n<!-- wp:blockparty/tabs-nav-item {\"label\":\"Legacy\",\"linkId\":\"block-tab-0-2\",\"panelId\":\"block-panel-0-2\",\"index\":2,\"lock\":{\"move\":true,\"remove\":true}} -->\n<li class=\"wp-block-blockparty-tabs-nav-item\"><a id=\"block-tab-0-2\" role=\"tab\" aria-controls=\"block-panel-0-2\" class=\"wp-block-blockparty-tabs-nav-link\" href=\"#block-tab-0-2\"><span>Legacy</span></a></li>\n<!-- /wp:blockparty/tabs-nav-item --></ul>\n<!-- /wp:blockparty/tabs-nav -->\n\n<!-- wp:blockparty/tabs-panels -->\n<section class=\"wp-block-blockparty-tabs-panels\"><!-- wp:blockparty/tabs-panel-item {\"linkId\":\"block-tab-0-0\",\"panelId\":\"block-panel-0-0\",\"index\":0,\"lock\":{\"move\":true,\"remove\":true}} -->\n<div role=\"tabpanel\" tabindex=\"0\" class=\"wp-block-blockparty-tabs-panel-item\" id=\"block-panel-0-0\" aria-labelledby=\"block-tab-0-0\"><div class=\"wp-block-blockparty-tabs-panel-item__inner\"><!-- wp:quote -->\n<blockquote class=\"wp-block-quote\"><!-- wp:paragraph -->\n<p><em>\"Gutenberg\" redirects here. For the Bible, see </em><a href=\"https://en.wikipedia.org/wiki/Gutenberg_Bible\">Gutenberg Bible</a><em>. For other uses, see </em><a href=\"https://en.wikipedia.org/wiki/Gutenberg_(disambiguation)\">Gutenberg (disambiguation)</a><em>.</em></p>\n<!-- /wp:paragraph --></blockquote>\n<!-- /wp:quote -->\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> (c. 1393–1406 – 3 February 1468) was a German inventor and <a href=\"https://en.wikipedia.org/wiki/Artisan\">craftsman</a> who invented the movable-type <a href=\"https://en.wikipedia.org/wiki/Printing_press\">printing press</a>. Though <a href=\"https://en.wikipedia.org/wiki/Movable_type\">movable type</a> was already in use in East Asia, Gutenberg's invention of the printing press enabled a much faster rate of <a href=\"https://en.wikipedia.org/wiki/Printing\">printing</a>. The printing press later <a href=\"https://en.wikipedia.org/wiki/Global_spread_of_the_printing_press\">spread across the world</a>, and led to an <a href=\"https://en.wikipedia.org/wiki/Information_revolution\">information revolution</a> and the unprecedented mass-spread of literature throughout Europe. It had a profound impact on the development of the <a href=\"https://en.wikipedia.org/wiki/Renaissance\">Renaissance</a>, <a href=\"https://en.wikipedia.org/wiki/Reformation\">Reformation</a>, and <a href=\"https://en.wikipedia.org/wiki/Humanist\">humanist</a> movements.</p>\n<!-- /wp:paragraph -->\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 --></div></div>\n<!-- /wp:blockparty/tabs-panel-item -->\n\n<!-- wp:blockparty/tabs-panel-item {\"linkId\":\"block-tab-0-1\",\"panelId\":\"block-panel-0-1\",\"index\":1,\"lock\":{\"move\":true,\"remove\":true}} -->\n<div role=\"tabpanel\" tabindex=\"0\" class=\"wp-block-blockparty-tabs-panel-item\" id=\"block-panel-0-1\" aria-labelledby=\"block-tab-0-1\"><div class=\"wp-block-blockparty-tabs-panel-item__inner\"><!-- wp:paragraph -->\n<p>Johannes Gutenberg was born in <a href=\"https://en.wikipedia.org/wiki/Electorate_of_Mainz\">Mainz</a> (in modern-day Germany), a wealthy city along the <a href=\"https://en.wikipedia.org/wiki/Rhine\">Rhine</a>, between the 14th and 15th centuries. 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 <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 <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. 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 <em>Hof zum Gutenberg</em>, a large and now destroyed <a href=\"https://en.wikipedia.org/wiki/Gothic_architecture\">Gothic</a>-style residence inherited by Gutenberg's father. Gutenberg probably spent his earliest years at the manor, which existed beside <a href=\"https://en.wikipedia.org/wiki/St._Christoph%27s_Church,_Mainz\">St. Christoph's</a>.</p>\n<!-- /wp:paragraph -->\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 --></div></div>\n<!-- /wp:blockparty/tabs-panel-item -->\n\n<!-- wp:blockparty/tabs-panel-item {\"linkId\":\"block-tab-0-2\",\"panelId\":\"block-panel-0-2\",\"index\":2,\"lock\":{\"move\":true,\"remove\":true}} -->\n<div role=\"tabpanel\" tabindex=\"0\" class=\"wp-block-blockparty-tabs-panel-item\" id=\"block-panel-0-2\" aria-labelledby=\"block-tab-0-2\"><div class=\"wp-block-blockparty-tabs-panel-item__inner\"><!-- wp:paragraph -->\n<p>Gutenberg's invention had an enormous impact on subsequent <a href=\"https://en.wikipedia.org/wiki/Human_history\">human history</a>, both on cultural and social matters. 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> As a result, Venzke describes the inauguration of the <a href=\"https://en.wikipedia.org/wiki/Renaissance\">Renaissance</a>, <a href=\"https://en.wikipedia.org/wiki/Reformation\">Reformation</a> and <a href=\"https://en.wikipedia.org/wiki/Humanism\">humanist</a> movement as \"unthinkable\" without Gutenberg's influence. Described as \"one of the most recognized names in the world\", a team of US journalists voted Gutenberg as the \"man of the millennium\" in 1999. Similarly, in 1999 the <a href=\"https://en.wikipedia.org/wiki/A%26E_Network\">A&amp;E Network</a> ranked Gutenberg the No. 1 most influential person of the second millennium on their \"Biographies of the Millennium\" countdown, while <em><a href=\"https://en.wikipedia.org/wiki/Time%E2%80%93Life\">Time–Life</a></em> magazine picked Gutenberg's invention as the most important of the second millennium in 1997. The scholar of paper history, <a href=\"https://en.wikipedia.org/wiki/Thomas_Francis_Carter\">Thomas Francis Carter</a>, drew parallels between <a href=\"https://en.wikipedia.org/wiki/Cai_Lun\">Cai Lun</a>, the traditional inventor of paper during the <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, <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>, <a href=\"https://en.wikipedia.org/wiki/Michael_H._Hart\">Michael H. Hart</a> ranked him 8th, below Cai but above figures such as <a href=\"https://en.wikipedia.org/wiki/Christopher_Columbus\">Christopher Columbus</a>, <a href=\"https://en.wikipedia.org/wiki/Albert_Einstein\">Albert Einstein</a> and <a href=\"https://en.wikipedia.org/wiki/Charles_Darwin\">Charles Darwin</a>.</p>\n<!-- /wp:paragraph -->\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 --></div></div>\n<!-- /wp:blockparty/tabs-panel-item --></section>\n<!-- /wp:blockparty/tabs-panels --></div>\n<!-- /wp:blockparty/tabs -->\nBLOCKPARTY_TABS_MARKUP_EOF;\n\n$page_id = wp_insert_post(\n\tarray(\n\t\t'post_title' => 'Blockparty Tabs',\n\t\t'post_name' => 'blockparty-tabs-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"
}
]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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.1.1 - 2026-04-20

- Update block icons
- Add WordPress Playground blueprint file
- Pin Volta toolchain to Node.js 24.15.0 (was 20.12.0)

## 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
@@ -1,5 +1,7 @@
[![Be API Github Banner](.github/banner-github.png)](https://beapi.fr)

[![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-tabs/refs/heads/main/.wordpress-org/blueprints/blueprint.json)

# Blockparty Tabs

An accessible tabs block for WordPress Gutenberg editor that follows ARIA best practices.
Expand Down
4 changes: 2 additions & 2 deletions blockparty-tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Accessible Tabs block for WordPress gutenberg.
* Requires at least: 6.2
* Requires PHP: 8.1
* Version: 1.1.0
* Version: 1.1.1
* Author: Be API Technical team
* Author URI: https://beapi.fr
* License: GPL-2.0-or-later
Expand All @@ -14,7 +14,7 @@

namespace Blockparty\Tabs;

define( 'BLOCKPARTY_TABS_VERSION', '1.1.0' );
define( 'BLOCKPARTY_TABS_VERSION', '1.1.1' );
define( 'BLOCKPARTY_TABS_URL', plugin_dir_url( __FILE__ ) );
define( 'BLOCKPARTY_TABS_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLOCKPARTY_TABS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
Expand Down
Loading
Loading