Inline Spoilers

外掛說明

The plugin allows to create content spoilers with Guttenberg block or simple shortcode.

[spoiler title="Expand Me"]Spoiler content[/spoiler]

螢幕擷圖

  • Guttenberg block
  • Spoiler shortcode [spoiler][/spoiler]
  • Collapsed spoiler
  • Expanded spoiler

適用於區塊編輯器

這個外掛提供 1 個可供 Gutenberg/區塊編輯器使用的區塊。

  • Inline Spoiler Hide text that can be revealed by clicking a button.

安裝方式

  1. Install via WordPress Dashboard or upload inline-spoiler.zip;
  2. Activate the plugin through the ‘Plugins’ menu in WordPress;
  3. Use Guttenberg block or shortcode in your content;

常見問題集

How can I customize design of the spoiler?

Just override classes defined in build/style-index.css with your theme styles.

使用者評論

2025 年 2 月 17 日
Это лучший Вордпресс-плагин для создания спойлеров! Разработчик прислушивается к идеям и пожеланиям, и внедряет их. А благодаря добавлению функции: «спойлеры внутри спойлеров» стало вообще отлично!
2025 年 2 月 16 日 3 則留言
После обновления перестали работать ссылки внутри спойлера. До этого всё было прекрасно. Исправьте, пожалуйста, поскольку аналогов у Вашего плагина пока пока нет.
2022 年 4 月 18 日
“Inline” means “in the same line” (see e.g. inline CSS, inline functions in C++). This plugin only allows inserting whole separate blocks with spoilers, not creating them in the same line. 1/5 for a misleading title that draws all searches to this dead-end which does not solve the problem.
2019 年 10 月 19 日
I’m using this plugin to mark NSFW parts in my blog and it works pretty good for that part. There are 2 minor problems though: 1. The plugin doesn’t show up on the paragraph’s (+) menu so I need to use [spoiler title=”NFSW”] … [/spoiler] manually each time (using WP 5.2.4). 2. I like the dark theme over the light theme and when using dark theme the text isn’t converted to white. When these 2 minor things are fixed I’ll give it a 5* rating.
閱讀全部 14 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Inline Spoilers〉的開發相關工作。

參與者

〈Inline Spoilers〉外掛目前已有 4 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Inline Spoilers〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 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 to true in wp-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 to details & 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

OLDER VERSIONS