[WordPress] 外掛分享: Visual Shortcodes

前言介紹

  • 這款 WordPress 外掛「Visual Shortcodes」是 2011-08-17 上架。
  • 目前有 100 個安裝啟用數。
  • 上一次更新是 2013-01-12,距離現在已有 4495 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.2.1 以上版本才可以安裝。
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

johnpbloch |

外掛標籤

editor | shortcodes | visual editor |

內容簡介

這是一個實用的外掛程式,能夠讓其他外掛和主題使用自訂圖片替換短代碼,就像 WordPress 原生的相冊短代碼所做的那樣。用戶可以點擊替換的圖片來顯示「刪除」按鈕。

當您的短代碼已經具有 tinymce 按鈕時,此外掛程式運作效果非常出色,但對於手動短代碼也同樣適用。

此外掛程式不支援多行短代碼或非自結束短代碼(例如,支援 [foo bar="baz"] 但不支援 [foo]bar baz[/foo])。誠實地說,我甚至不知道如果您嘗試使用這種格式會發生什麼。它可能會運作,但完全不支援。

若要添加短代碼,請在篩選器 'jpb_visual_shortcodes' 上掛鉤。篩選器會將一個數組作為引數傳遞。該數組的每個元素都是一個關聯數組,必須包含以下鍵的值:

shortcode 替換的短代碼名稱
image 替換短代碼的圖片 URL。

此外,該數組可能包含選填參數command,必須是有效的 tinymce 命令。若有此值,將在用戶單擊替換圖片時觸發第二個 UI 按鈕(「編輯」),單擊此按鈕時會執行傳遞的 tinymce 命令。

原文外掛簡介

This is a utility plugin that will allow other plugins and themes to swap out shortcodes with custom images, in the same way that WordPress’ native gallery shortcode does this. Replacement images can be clicked to reveal a ‘delete’ button.
This works extremely well when your shortcode already has a tinymce button, but does work for manual shortcodes too.
This plugin does not support multi-line shortcodes or non-self-closing shortcodes (e.g. it supports [foo bar="baz"] but not [foo]bar baz[/foo]). Honestly, I don’t even know what would happen if you tried to use one. It may work, but it’s entirely unsupported.
To add your shortcode, hook onto the filter 'jpb_visual_shortcodes'. That filter will pass one array as an argument. Each element of that array is an associative array which must contain values for the following keys:

shortcode The name of the shortcode to replace
image The url of the image to replace the shortcode with.

Additionally, the array may contain the optional parameter command, which must be a valid tinymce command. If present, this value will trigger a second UI button (‘Edit’) when the user clicks the replacement image which, when clicked, will execute the tinymce command passed as the value.

各版本下載點

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

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


0.1 | trunk |

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

  • Column Shortcodes 》此外掛提供簡單易用的短碼,在您的文章或頁面中輕鬆創建欄位。有時候,您只需要將網頁切成不同的欄位。使用此外掛,您只需選擇一個欄位的短碼,便可將欄位加...。
  • Sidebar Widgets by CodeLights 》❗ 很抱歉,由於 SiteOrigin 的 widgets API 完全更改,CodeLights 不再支援 SiteOrigin Page Builder 的原生使用。解決方案:您仍然可以在純文字編輯器中創...。
  • Shortcodes by Angie Makes 》Shortcodes by Angie Makes 外掛為您的 WordPress 主題新增一系列易於使用的短碼,這些短碼與 Angie Makes WordPress 主題 完美搭配。, 範例, 請到此查看這些...。
  • Apollo13 Framework Extensions 》Apollo13 Framework Extensions 為建立在 Apollo13 Framework 上的主題增加了一些功能。這些功能包括:, , 設計匯入器, 基於 Apollo13 Framework 功能的短代...。
  • ND Shortcodes 》預覽中的一些元件, 該外掛在你的頁面建構器(Elementor 或 WP Bakery Page Builder)中添加了一些有用的元件,可以非常容易地與你自己的主題集成。。
  • Meks Flexible Shortcodes 》Meks Shortcodes 是一個外掛,可以在文章/頁面內的內容中加入一些漂亮的元素。您可以透過使用者介面中的短碼產生器面板快速插入所有元素。對於每個短碼標籤,...。
  • Futurio Extra 》Futurio Extra 提供額外功能和選項給 Futurio 主題使用。, 該外掛需要免費的 WP 主題 Futurio 安裝才能使用。, Futurio Extra 帶來了新的小工具,可供 Elemen...。
  • WP Shortcode by MyThemeShop 》WP Shortcode 讓使用者只需點擊一下,即可在 WordPress 增加性感的按鈕、警告提示、欄位佈局等各式各樣的選項。這款高級插件曾經只向MyThemeShop的高級會員提...。
  • WP Date and Time Shortcode 》顯示當前、過去和未來日期或時間的簡碼。在您的文章和頁面中顯示今年、上一年、下一年、月份、日期等等。, 這可能是您網站所需的最後一個日期和時間簡碼插件...。
  • WooCommerce Shortcodes 》這個外掛提供一個 TinyMCE 的下拉式按鈕,讓您可以使用所有 WooCommerce 短碼。, 請參閱 WooCommerce 包含的短碼清單。, 從 WooCommerce 2.2 開始,這個 Tiny...。
  • WooCommerce Colors 》這款外掛在自訂選單上新增了一個名為 WooCommerce 的區塊,讓您輕鬆改變按鈕和 WooCommerce 元素的顏色。, 從 WooCommerce 2.3 開始,前端風格選項不再是 Woo...。
  • Weaver Xtreme Theme Support 》這是 Weaver Xtreme 主題的支援外掛。此外掛提供了一系列有用的簡碼和小工具,旨在補充 Weaver Xtreme 主題。這些簡碼是根據成千上萬的 Weaver Xtreme 和先前...。
  • TemplatesNext ToolKit 》這個外掛提供了許多必要的元素,如簡歷、團隊成員、推薦評價、輪播、WooCommerce 產品清單等等,使用短代碼、SiteOrigin Page Builder 或 Elementor widget ...。
  • TCD Google Maps 》TCD Google Maps 提供簡單的短代碼以顯示 Google 地圖。您可以將短代碼放置於文章、頁面或文字小工具中,以顯示各種風格的 Google 地圖。, 多樣的設計, 方便...。
  • Shortcake (Shortcode UI) 》Shortcake 可與 add_shortcode 搭配使用,提供使用者友善的介面來將 shortcode 加入文章中,並在內容編輯器中查看和編輯。, 安裝外掛後,您需要註冊 Shortcod...。

文章
Filter
Mastodon