[WordPress] 外掛分享: Wrapping ShortCode

WordPress 外掛 Wrapping ShortCode 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Wrapping ShortCode」是 2022-11-07 上架。
  • 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
  • 上一次更新是 2022-11-08,距離現在已有 908 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 5.9 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

asumaru |

外掛標籤

block | group | postmeta | shortcode | commentout |

內容簡介

您是否正在使用短代碼?
WordPress 的預設區塊編輯器中也有標準的短代碼區塊,但需寫程式碼才能使用。
此外,您無法將其他區塊置於短代碼之中,因此必須撰寫 HTML 代碼。

本外掛提供一個短代碼區塊。這不僅僅是一個短代碼,而是一個能夠包裹其他區塊的短代碼區塊。

** 輕鬆設置 **

只需選擇您在 WordPress 中啟用的短代碼即可使用。
短代碼引數也可進行設定,這些可在區塊編輯器側邊欄中進行設置。
選定的短代碼名稱還會顯示在編輯器中的區塊中。

** 可嵌套的區塊 **

本區塊可放置如「段落」和「圖片」等區塊。
這些區塊也可進行嵌套。
例如,可以使用能夠列出自訂欄位的短代碼與標題和段落組合重複使用。

本區塊可設置「評論標籤」。
在該區塊前後編寫指定的 HTML 註釋。
這對於設計調整非常有用。
如果您不進行設置,則不會在 HTML 代碼中顯示。

** 替換關鍵字 **

本區塊具有一些替換關鍵字。
這些關鍵字用於顯示短代碼信息。
例如,如果您在「附加 CSS 類」中輸入 %shortcode%,則選定的短代碼名稱將顯示在 CSS 類中。

本區塊本身不會輸出 HTML 標籤。
請與「群組」區塊一起使用。

本外掛包含「commentout」和「meta-loop」作為示範短代碼。
世界上還有許多其他短代碼。
利用本區塊中有用的短代碼資源。

使用方式
子區塊

子區塊是可選的。
子區塊可置於該區塊中。
也可以使用動態區塊。
「包裝短代碼」本身也可用於子區塊。
可在子區塊中使用替換關鍵字。
「包裝短代碼」本身不具備 HTML 標記。
與「Group」區塊一起使用。

短代碼

列出您 WordPress 網站中有效的短代碼。
選擇要使用的短代碼。

*在付費的專業版中,正在開發短代碼篩選功能。

引數

引數是可選的。
可以為指定的短代碼設置引數。
可以混合使用未命名和帶鍵的引數。
支持是否使用雙引號。
引數中也可以使用替換關鍵字。

註釋標籤

註釋標籤是可選的。
在該區塊前後編寫指定的 HTML 註釋。
如果您不進行設置,則不會在 HTML 代碼中顯示。
可以在註釋標籤中使用替換關鍵字。

額外的 CSS 類

額外的 CSS 類是標準項目。
額外的 CSS 類是可選的。
可以在額外的 CSS 類中使用替換關鍵字。

替換關鍵字

在該區塊中使用以下任何替換關鍵字替換相應值。
但如果短代碼或子區塊被嵌套,則替換關鍵字將優先於短代碼或子區塊。
* %shortcode%:選定的短代碼名稱
* %shortcodeAttrs%:設置短代碼的引數

原文外掛簡介

Are you using shortcodes?
There is also a standard shortcode block in the default block editor.
But it can’t be used without writing code.
Also, you can’t enclose other blocks in shortcodes, so you have to write the HTML code.
This plugin provides a shortcode block. It is not just a shortcode, it is a shortcode block that wraps other blocks.
** Easy configuration **
This is available by simply selecting a shortcode that you have enabled in WordPress.
Shortcode arguments are also configurable.
These are configurable in the block editor sidebar.
Also, the selected shortcode name is displayed in the block on the editor.
** Nestable blocks **
This block can place blocks such as “paragraph” and “image”.
This blocks can also be nested.
For example, it is possible to repeat headings and paragraphs in combination with shortcodes that can list custom fields.
This block can set a “Comment Label”.
Write the specified HTML comment out before and after this block.
Useful for design adjustments.
If you don’t set it, it won’t be written in the HTML source.
** replacement keyword **
This block has some replacement keywords.
Keywords are used to display shortcode information.
For example, if you enter “%shortcode%” in the Additional CSS class, the selected shortcode name will be displayed in the CSS class.
This block itself does not output HTML tags.
Please use it together with “Group” block.
This plugin includes “commentout” and “meta-loop” as sample shortcodes.
There are many other shortcodes in the world.
Take advantage of useful shortcode assets in this block.
Usage
Child blocks
Child blocks are optional.
Child blocks can be placed inside the block.
It is also possible to use dynamic blocks.
The “Wrapping ShortCode” itself is also available for child blocks.
It is possible to use replacement keywords within child blocks.
“Wrapping ShortCode” itself has no HTML tags.
Use with “Group” block
ShortCode
List valid shortcodes within your WordPress site.
Select the shortcode you want to use.
*In the Pro version (paid), a shortcode filtering function is under development.
Arguments
Arguments are optional.
Arguments can be set for the specified shortcode.
It is okay to mix unkeyed and keyed arguments.
It also supports the presence or absence of double quotes.
It is possible to use replacement keywords in arguments.
Commnet labels
Commnet labels are optional.
Write the specified HTML comment out before and after this block.
If you don’t set it, it won’t be written in the HTML source.
It is possible to use replacement keywords in comment labels.
Additional CSS Classes
Additional CSS classes are standard items.
Additional CSS classes are optional.
It is possible to use replacement keywords within additional CSS classes.
Replacement keywords
Replace any of the following replacement keywords in the block with the appropriate values.
However, if the shortcodes or child blocks is nested, the replacement keyword will take precedence over the shortcodes or child blocks.
* %shortcode%: Selected shortcode name
* %shortcodeAttrs%: Arguments of the set shortcode
* %shortcodeStr%: Generated shortcode string
* %wscClass%: Additional CSS class
Shortcode: commentout
Overview
[commentout (arguments) ]comment here[/commentout]
Writes the contents of the shortcode as HTML comments out.
Arguments

trim_br: Remove before and after content. Default “yes”
do_trim: Remove whitespace before and after content. Default “no”
do_shortcode: Run a content shortcode. Default “yes”
esc_html: Escape HTML tags in content. Default “yes”

Shortcode: meta-loop
Overview
[meta-loop (arguments) ]template HTML[/meta-loop]
Template and repeat the content of her shortcode by listing the custom field keys for the post.
eg. [meta-loop sample1 sample2 sample3 order=random]
#%number%) %key%:%value%
[/meta-loop]
Arguments

(meta key): The key of the custom field to output. Multiple allowed. Sequential number if omitted.
start: Output start position. 0 at the beginning. Default “0”
end: Output end position. Number of keys if null. Default “null”
step: position increment/decrement value. Default “1”
lines: Number of outputs. Default “null”. null is output until the end. 0 is hidden.
order: direction of sorting. default “none”
** none: no sorting.
** asc: Order sort.
** desc: Reverse sort.
** random: Random.
orderby: what to sort
** counter: output position
** metakey: the key of the custom field
** metavalue: custom field value
replaceNumber: Replacement keyword for output order. Default “%number%”
replaceCounter: replacement keyword for output position. Default “%counter%”
repkaceKey: Replacement keyword for the key of custom field. Default “%key%”
repkaceValue: Replacement keyword for custom field value. Default “%value%”
noContent: Alternate content if no template is specified.
nl2br: Whether to convert BR tags when there is a newline in the custom field value. Default “yes”.

Alternate content
%key%:%value%
replacement keyword

%counter%: Repeated number starting from 0
%number%: Repeated number starting from 1
%key%: the key of the custom field
%value%: custom field value

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Wrapping ShortCode」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


0.1.0 | trunk |

延伸相關外掛(你可能也想知道)

  • BuddyPress 》您正在尋找現代化,強大且複雜的社交網路軟體嗎?BuddyPress 是一套常見社交網路的組件,透過 WordPress 的豐富外掛系統,可以提供多種優秀的附加功能。, Bud...。
  • WP Telegram (Auto Post and Notifications) 》完美整合 Telegram 至 WordPress,讓您完全掌握控制。, Telegram 的卓越 LIVER 支援, 加入聊天室, 我們在 Telegram 上有一個公開小組,提供協助設置外掛、討...。
  • WP Telegram Widget and Join Link 》p>使用簡單的短代碼,在 WordPress Widget 或任何地方顯示 Telegram 公開頻道或群組的動態線。, 卓越的支援, 參加聊天室, 我們在 Telegram 上設有一個公開小...。
  • WPC Grouped Product for WooCommerce 》WPC Grouped Product for WooCommerce 是一個將不同的產品,包括簡單、變量產品或變化結合為一個統一的群組從而形成一種新的產品類型的外掛。使用者可以從單...。
  • Telegram Bot & Channel 》這個多用途的外掛能夠幫助你完成各種任務,包括教學、遊玩、搜索、廣播、提醒、連接以及整合你的服務。, 使用這個強大的機器人建造器,你可以:, 🤖 機器人建...。
  • Invite Anyone 》Invite Anyone 外掛包含兩個功能:, 1) 透過電子郵件邀請成員加入網站。此外掛會在每位成員的個人資料頁面上建立一個稱為「傳送邀請」的選項卡,該選項卡包含...。
  • WP User Groups 》WP User Groups 可以使用自定義的稅額和詞彙來將用戶進行分類。, , 預設建立了「群組(Groups)」和「類型(Types)」,並可進行覆蓋, 可使用自定義引數註冊...。
  • WUPO Group Attributes for WooCommerce 》這款由 WUPO 開發的 WordPress 外掛 WUPO Group Attributes,提供了額外的選項來顯示商品屬性。將屬性分組,以分區顯示這些屬性,讓造訪您網站的訪客更快地了...。
  • Website Toolbox Community 》Website Toolbox 是一個直觀的平台,可以建立您自己的論壇。使用我們的基於雲端的 WordPress 論壇外掛,輕鬆地在您的品牌下吸引觀眾。我們使論壇創建變得簡單...。
  • Stock Dependencies for WooCommerce 》使用 Stock Dependencies for WooCommerce,您可以使您在 WooCommerce 商店中出售的產品和變體依賴於其他產品或變體的庫存。客戶可以選擇和購買產品,而不必...。
  • Goodlayers Blocks 》這是一款實用外掛,可以幫助你美化網頁。該外掛包含以下組件:, – 手風琴, – 自定義組(包括手機樣式和負邊距), – 評分, – 圖形分...。
  • Plugin Manager 》如果你的 WordPress 外掛管理頁面有太多項目,可能會難以管理。這款外掛可以讓你將它們進行分類,方便管理 😀。
  • BuddyPress Restrict Group Creation 》這個外掛可以擴充 BuddyPress 內建的「僅允許站點管理員創建群組?」設定,你可以針對每個 WordPress 權限賦予規則以便限制創建群組的方式,並且授予多重控制...。
  • Responsive Flicker Widget 》這是一個用於 WordPress 的 Flickr 外掛,可以在側邊欄小工具中顯示使用者和群組的照片。, 外掛說明和演示, 功能:, , 響應式設計。, 易於配置。, 可以根據需...。
  • BP Group Home Widgets 》個人化群組首頁的能力是讓新成員了解群組內容的重要部分。BP Nouveau 添加了一個群組首頁與一個小工具區域,此外掛利用這個小工具區域來讓每個群組創建者在首...。

文章
Filter
Apply Filters
Mastodon