Show Hide Accordion by MediaArt

Description

This plugin provides shortcodes to show/hide content with an optional accordion behavior:

  • New shortcode: [ma_collapse]...[/ma_collapse] (and ma_collapse_level2..7)
  • Legacy compatibility: Keeps legacy bg_collapse* shortcodes functional (where possible without breaking other installed plugins).

The plugin is written to follow WordPress.org best practices:
* No inline JavaScript in PHP templates
* Admin actions protected by capability checks and nonces
* Sanitization/escaping on output
* Translatable strings (EN as base; Czech translation included)

Usage

Basic:
[ma_collapse]Hidden content[/ma_collapse]

With custom label:
[ma_collapse more= »Show more » less= »Show less »]Hidden content[/ma_collapse]

Accordion grouping:
Use the same group attribute on multiple shortcodes.
[ma_collapse group= »faq »]Item 1[/ma_collapse] [ma_collapse group= »faq »]Item 2[/ma_collapse]

Legacy:
[bg_collapse]Hidden content[/bg_collapse]

Captures d’écrans

Installation

  1. Upload the plugin folder to /wp-content/plugins/ or install via the Plugins screen.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Configure options under MA Tools Show/Hide Accordion.

FAQ

Does it work with the original shortcodes?

Yes, the plugin includes compatibility for legacy bg_collapse* shortcodes.

Where are the settings?

In the WordPress admin under MA Tools Show/Hide Accordion.

Avis

9 septembre 2026
This plugin has been a lifesaver because I was using Show-Hide/Collapse-Expand, which seems to have been abandoned after three years. It works immediately with the old bg_collapse markup, so just install it and deactivate Show-Hide. With the help of Claude AI, I designed additional CSS code to reproduce almost the former layout: /* — Show Hide Accordion: port of bg-orange-button — */.shabm-wrap {text-align: center;margin: 1em 0;}.shabm-wrap .shabm-content {text-align: left;}a.shabm-toggle,a.shabm-toggle:visited {display: inline-block;cursor: pointer;padding: 6px 24px;font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: inherit;line-height: normal;letter-spacing: normal;text-transform: none;text-decoration: none !important;text-shadow: 0 1px 0 #ffee66;background: linear-gradient(to bottom, #ffec64 5%, #ffab23 100%);background-color: #ffec64;border: 1px solid #ffaa22;border-radius: 8px;box-shadow: inset 0 4px 0 0 #fff6af;}a.shabm-toggle:hover,a.shabm-toggle:focus {border-bottom: 1px solid #ffaa22 !important;color: #72777c !important;background: linear-gradient(to bottom, #ffab23 5%, #ffec64 100%) !important;background-color: #ffab23 !important;text-decoration: none !important;outline: none;box-shadow:inset 0 1px 0 0 #fff6af,0 10px 10px rgba(0, 0, 0, 0.25) !important;}a.shabm-toggle .shabm-icon {position: relative;bottom: 1px;padding-right: 4px;font-size: inherit;} This could be used (and made optional) in future versions of this plugin. Once again, congratulations!
Lire l’avis

Contributeurs/contributrices & développeurs/développeuses

« Show Hide Accordion by MediaArt » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

“Show Hide Accordion by MediaArt” a été traduit dans 1 locale. Remerciez l’équipe de traduction pour ses contributions.

Traduisez « Show Hide Accordion by MediaArt » dans votre langue.

Le développement vous intéresse ?

Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.

Journal des modifications

1.0.0

  • Initial refactor release (MediaArt fork): new ma_collapse shortcode, legacy compatibility, settings page, translations.