OtFm Gutenberg Spoiler – (or FAQ) collapse block

Descripción

WordPress 5.0 introduces a block-based editor (codename «Gutenberg») that offers a streamlined editing experience.
The plugin provides in the block editor 2 types of spoilers:

  • Pequeño spoiler
  • Box spoiler

Little Spoiler – small spoiler for plain text.

Box spoiler – consists of 2 blocks:
Opening spoiler (Box Spoiler Start) and closing spoiler (Box Spoiler End)
Between them, you insert any block (or several block’s) with content that you want to hide.

In the frontend, the spoiler (accordion) opens with animation.
In the editor you can choose the color design of the spoiler.

Ability to add new colors or replace a set of colors. See FAQ

Want to hide part of the publication? or make up the FAQ? – plugin is perfect for this

Check out all beauty and power of the plugin by watching this video:

Requisitos

PHP 5.6+, 7, 7.1, 7.2 or 7.4 recommended for better performance, WordPress 5.8

Traducción

Available in English, Russian, Ukrainian, Spanish, German, Swedish, Dutch, Japanese, French, Italian, Norwegian, Portuguese and more other languages in becoming.

Agradecimientos

Thanks to Nilo Velez for Spanish (Spain) translation approval.
Thanks to Yordan Soares for Spanish (Venezuela) translation.
Thanks to Tor-Bjorn Fjellner for Swedish translation approval.
Thanks to Peter Smits for Dutch translation approval.
Thanks to miccweb for Japanese translation approval.
Thanks to FX Bénard for French translation approval.
Thanks to Luisa Ravelli and aliceorru for Italian translation approval.
Thanks to Eivind for Norwegian translation approval.
Thanks to Pedro Mendonça for Portuguese translation approval.
Thanks to Sergey Kovalets for Ukrainian translation.
Thanks to Jens Ratzel for German translation.

Capturas

  • Find & add spoiler blocks
  • Little spoiler
  • Box spoiler
  • En la vista pública
  • Spoiler abierto

Bloques

Este plugin proporciona 3 bloques.

  • Little Spoiler
  • Box Spoiler Start
  • Box Spoiler End

Instalación

  1. Upload the otfm-gutenberg-spoiler folder to your /wp-content/plugins/ directory or alternatively upload the otfm-gutenberg-spoiler.zip file via the plugin page of WordPress by clicking ‘Add New’ and selecting the zip from your computer.
  2. Activate the OtFm Gutenberg Spoiler WordPress plugin through the ‘Plugins’ menu in WordPress.
  3. Use OtFm Gutenberg Spoiler blocks on your next page or post.

Preguntas frecuentes

Accessibility support? Navigation by tab?

Yes!
Navigation by «Tab» button:
The «Up arrow» key pressed – If the focused spoiler is open, you close it
The «Down arrow» key pressed – If the focused spoiler is closed, you open it
Either the «Enter» key or «Space bar» pressed – You toggle the focused spoiler. If it is open, close it; if it is closed, open it.
The «End» key pressed – You move focus to the last spoiler on the page
The «Home» key pressed – You move focus to the first spoiler on the page

Support screen readers

How can I close a lot of blocks?

  1. find «Box Spoiler Start» and paste (spoiler open)
  2. blocks, blocks, blocks…
  3. find «Box Spoiler End» and paste (this spoiler closed)

How can I add my own color?

Add this snippet to your file functions.php:

// add new colors to spoiler
function otfmgs_add_new_colors($colors){
    $colors[]= array( 'color' => '#bd4747', 'name' => 'my_brown' );
    $colors[]= array( 'color' => '#32dd94', 'name' => 'my_green' );
    //... etc

    return $colors;
}
add_filter('otfmgs_colors','otfmgs_add_new_colors');

where: #bd4747 – new hex color

resultado: https://yadi.sk/i/223x_1-S3e_H1w

(disponible desde la versión 1.4.0 del plugin)

How to replace colors with your own set?

Add this snippet to your file functions.php:

// add my color palette to spoiler
function otfmgs_add_my_color_pallete($colors){
    $colors['new'][]= array( 'color' => '#bd4747', 'name' => 'my_brown' );
    $colors['new'][]= array( 'color' => '#32dd94', 'name' => 'my_green' );
    //... etc

    return $colors;
}
add_filter('otfmgs_colors','otfmgs_add_my_color_pallete');

where: #bd4747 – new hex color

resultado: https://yadi.sk/i/Fv7BaxRLkjj_SA

(disponible desde la versión 1.4.0 del plugin)

What WordPress themes work with OtFm Gutenberg Spoiler?

Any properly developed WordPress theme will work with OtFm Gutenberg Spoiler

¿Dónde consigo el bloque de spoiler?

  1. Go to the block editor (add new post)
  2. Haz clic en «Insertar bloque»
  3. Search for a block «spoiler» or «otfm» or «faq»

¿OtFm Gutenberg Spoiler es gratuito?

¡Sí! Las características del núcleo de OtFm Gutenberg Spoiler son absolutamente gratis.

¿Dónde puedo pedir ayuda?

Escríbeme a Otshelnik-Fm@yandex.ru

Reseñas

29 de abril de 2021
⭐⭐⭐⭐⭐ Спасибо автору за плагин, альтернатив для Gutenberg не нашёл. Плагин работает хорошо, форматировать уже имеющийся текст очень удобно. Автор ответил на мой вопрос на форуме и помог с кастомизаций плагина под сайт.
8 de septiembre de 2020
Easy to use spoiler plugin (to show or hide content-blocks as an accordion). Simple styled title row with heading, showing or hiding the complete following content-block or only a chunk of text. Looks well in desktop and mobile mode. (For better adaption of different website-designs it would be great if the color of the used borders for title-box and expanded content-box could be easily set via custom CSS code 😉
16 de septiembre de 2019
The most important feature for me was the box spoiler feature. After testing a little bit I can say that everything works fine! 🙂 Maybe you could implement custom colors into GUI.
20 de septiembre de 2018
This is hands down the best spoiler plugin for Gutenberg. It comes with 2 options to choose from: a simple spoiler for text only, and 2-piece spoiler which can be used with any blocks. The way it works is very simple, yet very effective. You just add some Gutenberg blocks between a START SPOILER and END SPOILER blocks, and you get a very good looking dropdown. Very happy with the plugin!
Leer todas las 5 reseñas

Colaboradores y desarrolladores

«OtFm Gutenberg Spoiler – (or FAQ) collapse block» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«OtFm Gutenberg Spoiler – (or FAQ) collapse block» ha sido traducido a 12 idiomas locales. Gracias a los traductores por sus contribuciones.

Traduce «OtFm Gutenberg Spoiler – (or FAQ) collapse block» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

Full Changelog