Contributors: sergeykuzmich, gadswan
Tags: shortcode, spoiler, bbcode, guttenberg, block
Stable tag: 2.1.0
Tested up to: 6.7.1
Requires at least: 6.6
Requires PHP: 7.2
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
The plugin allows to create content spoilers with Guttenberg block or simple shortcode.
[spoiler title="Expand Me"]Spoiler content[/spoiler]
- Install via WordPress Dashboard or upload
inline-spoiler.zip
; - Activate the plugin through the 'Plugins' menu in WordPress;
- Use Guttenberg block or shortcode in your content;
Just override classes defined in public/css/inline-spoilers-default.css
with your theme styles.
- 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
- 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]
- 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)
- 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
1.*.*
- Minify assets
- Update WordPress "Requires at least" version
- Update WordPress "Tested up to" version
- Fix
Inline Spoiler
block doesn't appear in Guttenberg editor (https://wordpress.org/support/topic/block-folder-is-missing/).
- Make flag for non-optimized script & style loading to prevent issues on some child themes ( see https://wordpress.org/support/topic/spoiler-doesnt-show-up/ for more information)
wp-config.php:
...
/** Set FALSE to disable 'Inline Spoliers' plugin script & style optimization
define( 'IS_OPTIMIZE_LOADER', false );
/* That's all, stop editing! Happy publishing. */
...
- Introduce Guttenberg block to create spoilers (special thanks to Sergey Zaytsev for doing most of things)
- Allow empty spoiler title by default
- Refactor deployment strategy to support multiply revisions for the same plugin version
- Compatibility up to Wordpress 4.9.8
- Always show spoiler contents while javascript is disabled
- Setup automated deployment with TravisCI
- Balance content html tags
- Add WP_DEBUG mode
- Fix incorrect paragraph tags inside the spoiler
- JavaScript bug fix
- Update spoiler default behaviour
- Update Russian translation
- Add attribute 'initial_state' to define default state of a spoiler
initial_state=(expanded|collapsed)
. Default state is 'collapsed' - Security updates
- Update Russian translation
- Release the plugin