[WordPress] 外掛分享: Callout Boxes

首頁外掛目錄 › Callout Boxes
WordPress 外掛 Callout Boxes 的封面圖片
50+
安裝啟用
尚無評分
1613 天前
最後更新
問題解決
WordPress 5.0+ PHP 7.0+ v0.3.2 上架:2021-08-03

內容簡介

此外掛包含一個呼叫框(callout box),裡面包含一個圖示以及文章內容。此外掛使用 Heroicons 和 php-heroicons PHP 套件。

圖示

呼叫框包含一個圖示,用以形容呼叫框的用途。

此外掛使用 Heroicons,你可以透過這個網站瞭解這個外掛中可使用的圖示。

你可以使用實心(solid)和輪廓(outline)兩種圖示。

類型

呼叫框可以有多種類型:

primary
success
danger
warning

預設情況下,呼叫框的類型是 primary。

圖示方法

圖示方法有兩種:

solid
outline

預設情況下,短碼和 Gutenberg 的圖示方法都是 solid。

短碼

對於 WordPress 經典編輯器甚至是 Gutenberg,你可以使用短碼:

[wp-callout icon="check-circle" type="primary" method="solid"]
歡迎使用 WordPress。這是文章內容。
[/wp-callout]

這個短碼支援三個屬性:

icon。呼叫框要顯示的圖示。(預設值:check-circle)
type。呼叫框類型。(預設值:primary)
method。(預設值:solid)

Gutenberg 區塊

對於 Gutenberg 使用者,你可以使用呼叫框(Callout Box)區塊。

每個 Gutenberg 呼叫框,都可以透過屬性更改圖示、類型和方法。

這些屬性與短碼相同。

然後,你只需要在 Gutenberg 區塊中輸入呼叫框內容。

區塊預設

當你插入新的 Gutenberg 呼叫框區塊時,你可以選擇此外掛中安裝的四種預設樣式:

信息(Information)
成功(Success)
危險(Danger)
警告(Warning)

選擇其中一個預設後,你的呼叫框將更改其背景顏色和圖示。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.3.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Callout Boxes」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

The callout box includes an icon, and the post content. This plugin uses Heroicons and php-heroicons PHP package.
Icons
A callout box includes an icon that describes what’s the purpose of the callout box.
The plugin is using Heroicons so you can go to its website and see what icons are available to use within this plugin.
You can use solid and outline icons.
Types
A callout box can have multiple types:

primary
success
danger
warning

By default, the callout box is primary.
Icon Methods
The icon method can be 2 types:

solid
outline

By default, for shortcodes and Gutenberg the icon method is solid.
Shortcode
For WordPress Classic Editor or even Gutenberg, you can use the shortcode:
[wp-callout icon="check-circle" type="primary" method="solid"]
Welcome to WordPress. This is the post content.
[/wp-callout]

The shortcode supports 3 attributes:

icon. The icon to show in the callout box. (Default: check-circle)
type Callout box type. (Default: primary)
method (Default: solid)

Gutenberg Block
For Gutenberg users, you can use Callout Box block.
Every Gutenberg Callout Box, you can change the icon, type and method using the block properties.
Those properties are the same for the shortcode.
Then, you just type your callout box content inside the Gutenberg block.
Block Presets
When you insert a new Gutenberg Block Callout you can select 1 of the 4 presets installed in the plugin:

Information
Success
Danger
Warning

After you select one preset, your callout box will change its background color and icon.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon