這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Inline Spoilers

外掛說明

The plugin allows to create content spoilers with simple shortcode & guttenberg block.

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

螢幕擷圖

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

適用於區塊編輯器

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

  • Inline Spoiler

安裝方式

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

常見問題集

How can I customize design of the spoiler?

Just override classes defined in styles/inline-spoilers-styles.css with your theme styles.

使用者評論

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.
2019 年 3 月 10 日 2 則留言
Works like a charm once you know that you can’t have spaces in a title. Use   instead and everything is fine.
2017 年 12 月 24 日
I’ve tried 9 plugins for spoilers. Only 2 of them allow you to read the text if javascript is disabled. And only this plugin works correctly with the theme customizr. Super!
閱讀全部 12 則使用者評論

參與者及開發者

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

參與者

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

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

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.5.5

  • Fix https://wordpress.org/support/topic/attempt-to-read-property-post_content-2/

1.5.4

  • Minify assets
  • Update WordPress “Requires at least” version
  • Update WordPress “Tested up to” version

1.5.1

  • Fix Inline Spoiler block doesn’t appear in Guttenberg editor (https://wordpress.org/support/topic/block-folder-is-missing/)

1.5.0

  • 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. */

1.4.1

  • Fix https://wordpress.org/support/topic/fatal-error-when-activating-the-plugin-10/

1.4.0

  • Introduce Guttenberg block to create spoilers (special thanks to Sergey Zaytsev for doing most of things)

1.3.8

  • Allow empty spoiler title by default

1.3.7

  • Refactor deployment strategy to support multiply revisions for the same plugin version

1.3.3

  • Fix https://wordpress.org/support/topic/notice-undefined-variable-extra-in-wp-content-plugins-inline-spoilers-inlin/

1.3.2

  • Compatibility up to WordPress 4.9.8

1.3.1

  • Always show spoiler contents while javascript is disabled

1.2.8

  • Setup automated deployment with TravisCI

1.2.5

  • Balance content html tags

1.2.4

  • Add WP_DEBUG mode
  • Fix incorrect paragraph tags inside the spoiler

1.2.3

  • JavaScript bug fix

1.2.2

  • Update spoiler default behaviour

1.1.2

  • Update Russian translation
  • Add attribute ‘initial_state’ to define default state of a spoiler initial_state=(expanded|collapsed). Default state is ‘collapsed’
  • Security updates

1.0.2

  • Update Russian translation

1.0.1

  • Release the plugin