{"id":171278,"date":"2023-03-03T17:07:15","date_gmt":"2023-03-03T17:07:15","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/show-hide-section-block\/"},"modified":"2025-05-08T16:25:09","modified_gmt":"2025-05-08T16:25:09","slug":"show-hide-section-block","status":"publish","type":"plugin","link":"https:\/\/szl.wordpress.org\/plugins\/show-hide-section-block\/","author":15605205,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"3.1.0","stable_tag":"3.1.0","tested":"6.8.5","requires":"6.4","requires_php":"7.4","requires_plugins":null,"header_name":"Show \/ Hide Section Block","header_author":"Happy Prime","header_description":"Display an accessible show\/hide interface with details and summary elements.","assets_banners_color":"95c585","last_updated":"2025-05-08 16:25:09","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/show-hide-section-block\/","header_author_uri":"https:\/\/happyprime.co\/","rating":5,"author_block_rating":0,"active_installs":90,"downloads":2404,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":{"2.0.1":{"tag":"2.0.1","author":"happyprime","date":"2023-03-29 14:23:56"},"2.0.2":{"tag":"2.0.2","author":"happyprime","date":"2023-04-27 18:43:29"},"2.0.3":{"tag":"2.0.3","author":"happyprime","date":"2023-04-28 17:15:34"},"3.0.0":{"tag":"3.0.0","author":"happyprime","date":"2024-11-06 05:30:52"},"3.1.0":{"tag":"3.1.0","author":"happyprime","date":"2025-05-08 16:25:09"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":3290035,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":3290035,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":3290039,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3290039,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":{"happyprime\/show-hide-group":{"$schema":"https:\/\/json.schemastore.org\/block.json","apiVersion":3,"name":"happyprime\/show-hide-group","title":"Show Hide Group","textdomain":"show-hide-section-block","category":"widgets","description":"A group of accessible summaries that can be toggled to show or hide additional details.","icon":"hidden","attributes":{"hasToggle":{"type":"boolean","default":false}},"supports":{"align":true,"alignWide":true,"anchor":true,"color":{"background":true,"enableContrastChecker":true,"text":true,"link":true,"gradients":true},"defaultStylePicker":true,"dimensions":{"minHeight":true},"html":false,"position":{"sticky":false},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true}},"editorScript":"file:index.js","viewScript":"file:view.js"},"happyprime\/show-hide-summary":{"$schema":"https:\/\/json.schemastore.org\/block.json","apiVersion":3,"name":"happyprime\/show-hide-summary","title":"Show Hide Summary","textdomain":"show-hide-section-block","category":"widgets","description":"The summary element in a details section.","icon":"media-document","parent":["happyprime\/show-hide-section"],"attributes":{"summary":{"type":"string","source":"html","selector":"summary"}},"supports":{"anchor":true,"align":true,"alignWide":true,"color":{"background":true,"enableContrastChecker":true,"text":true,"link":true,"gradients":true},"defaultStylePicker":true,"dimensions":{"minHeight":true},"html":false,"multiple":true,"position":{"sticky":false},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true}},"editorScript":"file:index.js"},"happyprime\/show-hide-details":{"$schema":"https:\/\/json.schemastore.org\/block.json","apiVersion":3,"name":"happyprime\/show-hide-details","title":"Show Hide Details","textdomain":"show-hide-section-block","category":"widgets","description":"The remaining content in a details section.","icon":"media-document","parent":["happyprime\/show-hide-section"],"attributes":{},"supports":{},"editorScript":"file:index.js"},"happyprime\/show-hide-section":{"$schema":"https:\/\/json.schemastore.org\/block.json","apiVersion":3,"name":"happyprime\/show-hide-section","title":"Show Hide Section","textdomain":"show-hide-section-block","category":"widgets","description":"A section of collapsible content contained in a details element with a summary.","icon":"media-document","parent":["happyprime\/show-hide-group"],"attributes":{"isOpen":{"type":"boolean","default":false}},"supports":{"anchor":true,"align":true,"alignWide":true,"color":{"background":true,"enableContrastChecker":true,"text":true,"link":true,"gradients":true},"defaultStylePicker":true,"dimensions":{"minHeight":true},"html":false,"multiple":true,"position":{"sticky":false},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true}},"editorScript":"file:index.js"}},"tagged_versions":["2.0.1","2.0.2","2.0.3","3.0.0","3.1.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2125,4557,520],"plugin_category":[],"plugin_contributors":[208741,80671,209288,209287],"plugin_business_model":[],"class_list":["post-171278","plugin","type-plugin","status-publish","hentry","plugin_tags-collapsible","plugin_tags-details","plugin_tags-summary","plugin_contributors-happyprime","plugin_contributors-jeremyfelt","plugin_contributors-philcable","plugin_contributors-slocker","plugin_committers-happyprime","plugin_committers-jeremyfelt"],"banners":{"banner":"https:\/\/ps.w.org\/show-hide-section-block\/assets\/banner-772x250.jpg?rev=3290039","banner_2x":"https:\/\/ps.w.org\/show-hide-section-block\/assets\/banner-1544x500.jpg?rev=3290039","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/show-hide-section-block\/assets\/icon-128x128.jpg?rev=3290035","icon_2x":"https:\/\/ps.w.org\/show-hide-section-block\/assets\/icon-256x256.jpg?rev=3290035","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Show \/ Hide Section Block provides four blocks that are used to display a group of <code>&lt;details&gt;<\/code> elements that each contain a <code>&lt;summary&gt;<\/code> and an arbitrary number of additional blocks.<\/p>\n\n<ul>\n<li>The Show Hide Group block is a wrapping <code>&lt;div&gt;<\/code>.<\/li>\n<li>The Show Hide Section block is a wrapping <code>&lt;details&gt;<\/code>. One or more of these blocks is added to a Show Hide Group block.<\/li>\n<li>The Show Hide Summary block contains the content for a <code>&lt;summary&gt;<\/code> tag. One of these blocks is inside each Show Hide Section block.<\/li>\n<li>The Show Hide Details block contains arbitrary content. One of these blocks is added inside each Show Hide Section block.<\/li>\n<\/ul>\n\n<p>The HTML output for an individual section is:<\/p>\n\n<pre><code>&lt;!-- Each section block has a details element. --&gt;\n&lt;details class=\"wp-block-happyprime-show-hide-section\"&gt;\n    &lt;!-- Each details element has a summary and additional, collapsible content. --&gt;\n    &lt;summary class=\"wp-block-happyprime-show-hide-summary\"&gt;Summary text&lt;\/summary&gt;\n    &lt;!-- Additional inner blocks of any type are populated here. --&gt;\n&lt;\/details&gt;\n<\/code><\/pre>\n\n<p>The HTML output for the group is:<\/p>\n\n<pre><code>&lt;div class=\"wp-block-happyprime-show-hide-group\"&gt;\n    &lt;!-- Optional based on attribute --&gt;\n    &lt;button class=\"toggle-all\" aria-expanded=\"false\"&gt;Open all&lt;\/button&gt;\n    &lt;details class=\"wp-block-happyprime-show-hide-section\"&gt;\n        &lt;summary class=\"wp-block-happyprime-show-hide-summary\"&gt;&lt;\/summary&gt;\n        &lt;!-- Additional blocks to be shown\/hidden --&gt;\n    &lt;\/details&gt;\n    &lt;details class=\"wp-block-happyprime-show-hide-section\"&gt;\n        &lt;summary class=\"wp-block-happyprime-show-hide-summary\"&gt;&lt;\/summary&gt;\n        &lt;!-- Additional blocks to be shown hidden --&gt;\n    &lt;\/details&gt;\n    &lt;!-- Additional section blocks --&gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n\n<p>An option is provided in the block's side panel to toggle an \"Open all\"\/\"Close all\" button. If this is toggled on for a block, an additional <code>&lt;button&gt;<\/code> element will be inserted and JavaScript will be used on the front-end to control the show\/hide behavior of all <code>&lt;details&gt;<\/code> elements in the group at once.<\/p>\n\n<p>If the toggle is off, no JavaScript is loaded on the front end and only the browser's default behavior is used for opening and closing <code>&lt;details&gt;<\/code> elements.<\/p>\n\n<!--section=changelog-->\n<h3>3.1.0<\/h3>\n\n<ul>\n<li>Automatically open an associated <code>&lt;details&gt;<\/code> element when its anchor is used in a URL.<\/li>\n<li>Update dependencies.<\/li>\n<li>Confirm compatibility with WordPress 6.8.<\/li>\n<li>Confirm license in plugin header.<\/li>\n<\/ul>\n\n<h3>3.0.0<\/h3>\n\n<ul>\n<li>Refactor block markup to improve editorial experience and formatting options.<\/li>\n<li>Introduce <code>happyprime\/show-hide-summary<\/code> block to manage <code>&lt;summary&gt;<\/code> content.<\/li>\n<li>Introduce <code>happyprime\/show-hide-details<\/code> block to manage remaningin <code>&lt;details&gt;<\/code> content.<\/li>\n<li>Upgrade <code>happyprime\/show-hide-group<\/code> and <code>happyprime\/show-hide-section<\/code> blocks to API v3.<\/li>\n<li>Add a deprecation routine to transform 2.0.x block markup into the new format.<\/li>\n<li>Replace <code>@wordpress\/scripts<\/code> with slimmer build configuration.<\/li>\n<li>Bump minimum WordPress version to 6.4; confirm compatibility with 6.7.<\/li>\n<\/ul>\n\n<h3>2.0.3<\/h3>\n\n<ul>\n<li>Fix an issue where the front-end script was enqueued twice.<\/li>\n<\/ul>\n\n<h3>2.0.2<\/h3>\n\n<ul>\n<li>Fix an issue preventing Open All toggle from working in Chrome.<\/li>\n<li>Update <code>@wordpress\/scripts<\/code> dependency to 26.3.0.<\/li>\n<li>Improve block organization, use of <code>block.json<\/code>.<\/li>\n<\/ul>\n\n<h3>2.0.1<\/h3>\n\n<ul>\n<li>Add a variety of <code>supports<\/code> options to <code>block.json<\/code> so that core styles can be applied as expected.<\/li>\n<li>Improve asset loading so that the front-end script is only enqueued when the block is in use <strong>and<\/strong> when the the open\/close all option is selected.<\/li>\n<li>Add languages directory, POT file for translations.<\/li>\n<\/ul>\n\n<h3>2.0.0<\/h3>\n\n<p>Initial public release.<\/p>","raw_excerpt":"Display an accessible show\/hide interface with details and summary elements.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/171278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=171278"}],"author":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/happyprime"}],"wp:attachment":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=171278"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=171278"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=171278"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=171278"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=171278"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=171278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}