前言介紹
- 這款 WordPress 外掛「WidgetShortcode」是 2023-02-13 上架。 目前已經下架不再更新,不建議安裝使用。
- 目前有 20 個安裝啟用數。
- 上一次更新是 2023-02-20,距離現在已有 802 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 6.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 有 1 人給過評分。
- 論壇上目前有 2 個提問,問題解答率 50%
外掛協作開發者
rsusanto | jaworskimatt |
外掛標籤
widget | widgets | shortcode | widgetshortcode | widget. shortcode |
內容簡介
WidgetShortcode 是一款 WordPress 外掛,可讓您將任何 widget 轉換為 WordPress shortcode 或顯示一個 widget,並提供專用區塊。這些shortcode 可以用於文章、頁面等。
它還提供了專用區塊,更便於在區塊編輯器中選擇要顯示的 widget。
這個外掛除了在傳統 WordPress 編輯器中運作良好外,在區塊編輯器(對於沒有古騰堡區塊的 widget)和其他頁面建構器中也運作良好。這樣您不僅限於只有側邊欄,而且您的編輯工具的選擇不是基於外掛區塊功能。
自動模式 -- WidgetShortcode 區塊
此區塊可以呈現 WidgetShortcode 位置中的任何 widget。首先在專用的 widget 區域中添加 widget。然後放置 WidgetShortcode 區塊,點擊它並從下拉列表中選擇其中一個 widget。
手動模式 -- shortcode
這個外掛會為每個 widget 添加一個 shortcode。您可以複製此 shortcode,並將它粘貼到 WordPress 的任何位置。如果:
* 您沒有使用區塊編輯器
* 您更喜歡使用其他區塊來呈現 shortcode
* 您想使用其中一個進階參數
手動模式 -- 進階參數
您可以使用以下額外參數來覆蓋 HTML、CSS 類和 id。這個部分是給高級使用者的!
title
覆蓋 widget 標題
設置為 0 (零)可以禁用標題
title_tag
用於 widget 標題的 HTML 標籤
預設值: h2
title_class
用於 widget 標題的 CSS 類
預設值: widgettitle
container_tag
用作 widget 容器的 HTML 標籤
預設值: div
container_class
添加到 widget 容器的 CSS class 名稱
預設值: widget %2$s
使用 sprintf(),使用不當會導致網站崩潰
container_id
用於 widget 容器的 HTML ID 屬性
預設值: %1$s
使用 sprintf(),使用不當會導致網站崩潰
特別鳴謝
shazdeh -- 提供原始碼
rsusanto -- 提供 JavaScript 的除錯
Helen Bedd -- 為測試
WordFence 和 Lana Codes -- 提供原始外掛漏洞的相關建議
原文外掛簡介
WidgetShortcode is a WordPress plugin allowing you to turn any widget into a WordPress shortcode or display a widget with a dedicated block. The shortcodes can then be used in posts, pages, and more.
It also has a dedicated block, making it easier to select a widget to show in the Block Editor.
It works great in the classic WordPress editor, but also in the block editor (for widgets that don’t have a Gutenberg block) and other page builders. This way you are not limited to only sidebars and your choice of editing tools is not based on the block functionality of the plugins.
Automatic mode – WidgetShortcode block
This block can render any widget located in the WidgetShortcode position. First add widgets to the dedicated widget area. Then place the WidgetShortcode block, click it and select one of the widgets from the drop-down list.
Manual mode – the shortcode
The plugin adds a shortcode to every widget. You can copy this shortcode and paste it anywhere in WordPress. This alternative to automatic mode can be used if:
* You are not using the block editor
* You prefer to use a different block to render the shortcode
* You want to use one of the advanced parameters
Manual mode – advanced parameters
You can use additional parameters below to override HTML, CSS classes and ids. This section is for advanced users!
title
Overrides the widget title
Set to 0 (zero) to disable the title
title_tag
HTML tag to use for the widget title wrapper
Default: h2
title_class
CSS class for the widget title wrapper
Default: widgettitle
container_tag
HTML tag to use as the widget container
Default: div
container_class
CSS classname added to the widget container
Default: widget %2$s
Uses sprintf() and can crash your website if used incorrectly
container_id
HTML ID attribute for the widget container
Default: %1$s
Uses sprintf() and can crash your website if used incorrectly
Special thanks
shazdeh – for the original code
rsusanto – for JavaScript debugging
Helen Bedd – for testing
WordFence and Lana Codes – for insights into the original plugin’s vulnerabilities
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WidgetShortcode」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.0.2 | 1.1.0 | trunk |
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。