[WordPress] 外掛分享: Insert Special Characters

首頁外掛目錄 › Insert Special Characters
WordPress 外掛 Insert Special Characters 的封面圖片
3,000+
安裝啟用
★★★★
4.9/5 分(8 則評價)
56 天前
最後更新
問題解決
WordPress 6.5+ PHP 7.4+ v1.1.3 上架:2019-08-29

內容簡介

曾經在 WordPress 區塊編輯器(Gutenberg)中想要插入特殊字元卻突然想念經典編輯器和特殊字元插入器嗎?不用再期待了,插入特殊字元外掛現已來解您的發佈煩惱!

註釋:您可以透過 ctrl/cmd + o 鍵盤快速鍵來顯示 popover。

開發將會在 GitHub 存儲庫進行。

技術備註

需要 PHP 7.4 以上版本。
需要 WordPress 5.7+。
在 GitHub 存儲庫中歡迎問題和拉取請求。

擴充功能

開發人員可以透過insertspecialcharacters-characters JavaScript(wp.hooks)篩選器來控制可用的標籤和字元集。

例如,要創建只提供貨幣符號的字元插入器:

wp.hooks.addFilter(
'insertspecialcharacters-characters', // 篩選器名稱。
'mycallback', // 我們的回調命名空間。
function( component ) { // 回調函數。
// 返回要顯示的類別和字元。
// 數據結構為:{ 類別: [ 字元數據 ], 類別2: ... }
return {
"貨幣": [
{ "entity": "$", "hex": "", "name": "Dollar Sign", "char": "$" },
{ "entity": "€", "hex": "&#20AC;", "name": "Euro Sign", "char": "€" },
{ "entity": "¢", "hex": "&#00A2;", "name": "Cent Sign", "char": "¢" },
{ "entity": "£", "hex": "&#00A3;", "name": "Pound Sign", "char": "£" },
{ "entity": "¥", "hex": "&#00A5;", "name": "Yen Sign", "char": "¥" },
]
};
}
);

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.3) 或搜尋安裝

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

原文外掛簡介

Ever wanted to add a special character while working within the WordPress block editor (Gutenberg) and suddenly find yourself longing for the days of the Classic Editor and the Special Character inserter? Well long no more, the Insert Special Characters plugin is here to ease your publishing woes!
Note: you can display the popover via the ctrl/cmd + o keyboard shortcut.
Development takes place in the GitHub repository.
Technical Notes

Requires PHP 7.4+.
Requires WordPress 6.6+
Issues and Pull requests welcome in the GitHub repository.

Extending
To control the available tabs and characters, developers can filter the data set using the insertspecialcharacters-characters JavaScript (wp.hooks) filter.
For example, to create a character inserter that only provides currency symbols:
wp.hooks.addFilter(
'insertspecialcharacters-characters', // The filter name.
'mycallback', // Our callback namespace.
function( component ) { // The callback function.

// Return the categories/characters to display.
// The data structure is: { category: [ character data ], category2: ... }
return {
"Currency": [
{ "entity": "$", "hex": "", "name": "Dollar Sign", "char": "$" },
{ "entity": "€", "hex": "AC;", "name": "Euro Sign", "char": "€" },
{ "entity": "¢", "hex": "�A2;", "name": "Cent Sign", "char": "¢" },
{ "entity": "£", "hex": "�A3;", "name": "Pound Sign", "char": "£" },
{ "entity": "¥", "hex": "�A5;", "name": "Yen Sign", "char": "¥" },
]
};
}
);

文章
Filter
Apply Filters
Mastodon