Toggles

外掛說明

You can use this block to hide and reveal content as needed. Create FAQ pages, hide spoilers in posts, or create simple accordion elements.

The block uses <details> and <summary> HTML elements and doesn’t require any additional JavaScript or CSS on the theme side.

螢幕擷圖

  • The block with no styles.
  • The block with custom styling.
  • Block Editor.

適用於區塊編輯器

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

  • Toggles An easy way to hide and reveal content.

常見問題集

Want to change default styles?

You can add some basic styling with just a few lines of CSS. Example:

.wp-block-toggles {
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 3px;
    margin: 1.5rem 0;
    padding: 0.5rem 1rem;
}

.wp-block-toggles summary {
    cursor: pointer;
}

Want to report a bug?

Create an issue at the Mamaduka/toggles repo.

使用者評論

2022 年 10 月 30 日 1 reply
Awesome plugin. I use it to add simple, minimalistic toggles that show/hide additional info on my site. Thank you!
閱讀全部 2 則使用者評論

參與者及開發者

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

參與者

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

對開發相關資訊感興趣?

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

變更記錄

1.0.1 – 2022-02-14

  • Bumped minimum required WordPress version to 5.8.
  • Pass component to renderAppender.

1.0.0 – 2021-02-05

  • Initial release.