Описание
The plugin allows to create content spoilers with Guttenberg block or simple shortcode.
[spoiler title="Expand Me"]Spoiler content[/spoiler]
Блоки
Этот плагин предоставляет 1 блок.
- Inline Spoiler Hide text that can be revealed by clicking a button.
Установка
- Install via WordPress Dashboard or upload
inline-spoiler.zip
; - Активируйте плагин на странице ‘Плагины’ в меню WordPress;
- Use Guttenberg block or shortcode in your content;
Часто задаваемые вопросы
-
Как я могу изменить внешний вид спойлера?
-
Just override classes defined in
build/style-index.css
with your theme styles.
Отзывы
Участники и разработчики
«Встроенные спойлеры» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:
Участники«Встроенные спойлеры» переведён на 4 языка. Благодарим переводчиков за их работу.
Перевести «Встроенные спойлеры» на ваш язык.
Заинтересованы в разработке?
Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.
Журнал изменений
2.1.0
- Fixed interaction with links & other interactive elements inside the spoiler
- Fixed styling for the spoiler made with the shortcode, when there is no spoiler block
EXPERIMENTAL
- Provide support for dynamic shortcodes
[spoiler-{variable}]
(e.g.[spoiler-alpha]
,[spoiler-beta]
, etc.)
Set
IS_DYNAMIC_SHORTCODE
totrue
inwp-config.php
to enable the feature:define('IS_DYNAMIC_SHORTCODE', true);
Usage example:
[spoiler-alpha title="Parent"]
[spoiler-beta title="The First Child"]
Hello World!
[spoiler-gamma title="Grand Child"]
I was born!
[/spoiler-gamma]
[/spoiler-beta]
[spoiler-beta title="The Second Child"]
Goodbye World!
[/spoiler-beta]
[/spoiler-alpha]
2.0.0
- Change spoiler HTML semantic (from
div
todetails
&summary
)- All blocks created with the previous version of Guttenberg block will be the same as before, until you edit them
- Allow spoilers inside spoilers (as well as any other Guttengerg blocks allowed in post)
WARNING
* Minimal required WordPress version is 6.6 (for JSX support, JSX in WordPress 6.6)
* The plugin is not fully tested with PHP versions lower than 8.1 due to the lack of available official docker images