[WordPress] 外掛分享: Text Toggle

WordPress 外掛 Text Toggle 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Text Toggle」是 2015-09-15 上架。
  • 目前有 20 個安裝啟用數。
  • 上一次更新是 2015-09-28,距離現在已有 3506 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 2.9.2 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

hoosierdragon |

外掛標籤

text | jquery | toggle |

內容簡介

這是一個非常簡單的短碼系列,可創建一個文本區域,該文本區域可以基於標題上的單擊來隱藏或顯示。默認情況下,文本區域是隱藏的。

此短碼系列使用 jQuery 功能來 a) 確定要切換哪些文本區域和 b) 切換它們。

使用

基本用法是使用“[tt]”短碼將一段文本包圍起來,並在短碼中指定一個標題參數。標題將顯示在頁面上,前面帶有一個指示器,顯示相關文本區域是隱藏 (►) 還是顯示 (▼)。單擊標題鏈接將切換相關文本區域的顯示,並切換指示器。

通過“[tt_part]”和“[tt_all]”短碼,可以一次顯示或隱藏文本區域的組。

“[tt_part]”短碼使用名爲“class”的必填參數,將其與所有具有相同類參數的“[tt]”短碼及其相關聯的文本區域關聯。單擊“[tt_part]”標題鏈接將根據父短碼的狀態切換所有相關文本區域和任何具有相同類的“[tt_part]”短碼鏈接。當單擊父鏈接時已經顯示的該部分的文本區域將保持顯示,隱藏的文本區域也是如此。

“[tt_all]”短碼將切換所有“[tt]”短碼文本區域,任何中間“[tt_part]”鏈接以及任何鏡像“[tt_all]”鏈接,並根據特定標題鏈接的狀態切換。當單擊鏈接以顯示所有文本區域時,已經顯示的文本區域將保持顯示,隱藏的區域亦是如此。

“[tt_part]”和“[tt_all]”短碼都可以放置在網頁的任何位置,並且可以多次在同一網頁上使用。

參數

“[tt]”短碼具有一個必填參數和兩個可選參數,以及必填的短碼內容。

“class”參數是可選的:這將該特定文本區域與“[tt_part]”短碼關聯起來,從而可以顯示或隱藏文本區域組。該參數必須只包含字母和數字。
“style”參數是可選的:這允許作者將 CSS 樣式組件應用於給定的短碼內容,該內容僅在顯示該內容時可見。樣式組件僅限於適用於周圍區域和包括將顯示的區域的任何內容,並且僅限於以下內容:background-color、border、border-color、border-radius、border-size、border-style 和 color。任何其他樣式組件或其他內容將被忽略。
“title”參數是必需的:它是文本區域的標題,並用作控制鏈接。

“[tt_part]”短碼具有兩個必填參數;它不使用任何內容。

“class”參數是必需的:這是所有相關“[tt]”文本區域的鏈接。該參數必須只包含字母和數字。
“title”參數是必需的:這是控制鏈接的標題,在其前面加上“Show / Hide All”。

“[tt_all]”短碼沒有參數,也不使用任何內容。

原文外掛簡介

A very simple shortcode series to create a text area which can be hidden or displayed based on a click on the title. Text areas by default are hidden.
This shortcode series uses jQuery functionality to a) determine which text areas are to be toggled and b) toggle them.
Use
Basic use is to surround a block of text with the “[tt]” shortcode and specify a title parameter within the shortcode. The title will be shown on the page, preceeded by an indicator whether the associated text area is hidden (►) or shown (▼). Clicking the title link will toggle the display of the dependant text area, as well as toggle the indicator.
Groups of text areas can be shown or hidden at once through the “[tt_part]” and “[tt_all]” shortcodes.
The “[tt_part]” shortcode uses a required parameter named “class” that links it to all “[tt]” shortcodes and their associated text areas with the same class parameter. Clicking the “[tt_part]” title link will toggle all associated text areas and any “[tt_part]” shortcode links with the same class according to the status of the parent shortcode. Text areas of this section that are already displayed when the parent link is clicked will remain displayed, and vice versa with hidden text areas.
The “[tt_all]” shortcode will toggle all “[tt]” shortcode text areas, any intermediate “[tt_part]” links and any mirrored “[tt_all]” links, according to the status of the particular title link. Text areas that are already displayed when the overall link is clicked to display all the text areas will remain displayed, and vice versa with hidden text areas.
Both the “[tt_part]” and “[tt_all]” shortcodes may be placed anywhere on the web page and can be used multiple times on the same web page.
Parameters
The “[tt]” shortcode has one required parameter and two optional parameters, plus the required content of the shortcode.

The “class” parameter is optional: this links the particular text area with the “[tt_part]” shortcode, which can display or hide groups of text areas. This parameter must consist of only letters and numbers.
The “style” parameter is optional: this allows the author to apply CSS style components to the given shortcode content, which will only be visible when the content is made visible. Style components are limited to anything that applies to the area surrounding and including the area to be displayed and are limited to the following: background-color, border, border-color, border-radius, border-size, border-style, and color. Any other style components or any other text will be ignored.
The “title” parameter is required: this what is displayed as the title of the text area and is used as the control link.

The “[tt_part]” short code has two required parameters; it does not use any content.

The “class” parameter is required: this is the link to all associated “[tt]” text areas. This parameter must consist of only letters and numbers.
The “title” parameter is required: this what is displayed as the title of the control link, preceded by “Show / Hide All”.

The “[tt_all]” short code has no parameters and it does not use any content.

各版本下載點

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

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


1.1 | 1.2 | trunk |

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

  • WP Shortcodes Plugin — Shortcodes Ultimate 》Shortcodes Ultimate 是一個全面的視覺與功能性元素收集,您可以在文章編輯器、文字小工具甚至是範本檔案中使用。使用 Shortcodes Ultimate,您可以輕鬆地建...。
  • Parent Category Toggler 》當選擇子目錄時,自動切換到父目錄。, 1.3.4, , 相容更新 WordPress 4.8。, , 1.3.3, , 測試過 WP 4.4。, , 1.3.2, , 只在 wp-admin 的文章 (也包括自訂文章...。
  • Bellows Accordion Menu 》Bellows 是一個讓 WordPress 網站擁有漂亮手風琴選單的外掛,它可以運用 WordPress 的選單系統讓你建立出美麗的手風琴選單。, Bellows Lite Demo, Bellows Fu...。
  • Olevmedia Shortcodes 》Olevmedia Shortcodes 外掛在編輯器中新增了一個按鈕,提供了許多方便的短碼:, , 手風琴, 開關, 標籤頁(響應式), 引言, 方框, 按鈕(您可以選擇圖示、顏色...。
  • Arconix FAQ 》這款外掛可以讓您輕鬆創建時尚的常見問題解答區,並透過提供的簡碼([faq])顯示您的常見問題解答,使用動畫的 jQuery 切換或手風琴折疊框來顯示/隱藏它們。 ...。
  • Arconix Shortcodes 》此外掛可讓你輕鬆地增加各種樣式的框、按鈕、選項卡、手風琴、無序清單、列和更多等元素。, 版本 2.0 新增的框、按鈕、清單和選項卡短碼支援自訂的 FontAweso...。
  • Title Toggle for Storefront Theme 》, 這個外掛讓您可以輕鬆地從特定頁面或文章中移除頁面標題。最基本的使用情境是隱藏您在 “Home” 頁面中所設定的標題。, 此外掛只適用於 Storefro...。
  • TJ Shortcodes 》這個外掛增加了一組短代碼,以提升你的網站。你可以輕鬆地添加按鈕、警告、欄位等等,無需編程知識!, 短代碼包括, , 警告, 按鈕, 欄位, 選項卡, 翻轉, 首字...。
  • Dark Mode Toggle 》Dark Mode Toggle 是一個非常優秀的 WordPress 外掛,可以快速在你的網站上添加暗黑/夜間模式開關按鈕。使用者只需要點擊切換按鈕就可以輕鬆在暗色或亮色主題...。
  • azurecurve Toggle Show/Hide 》切換以顯示/隱藏內容(允許自定義標題)。, 使用基本格式 [toggle]content[/toggle] 以使用切換。, 使用 title 參數設置標題:[toggle title=’點擊以顯...。
  • Accordion Toggle 》Accordion Toggle 可以幫助您以讀者易於查找的方式顯示常見問題或重要內容。使用此 Accordion Toggle 外掛程式,您可以在 Gutenberg 中創建這些關鍵內容。, ,...。
  • Toggles Shortcode and Widget 》這個 WordPress 外掛讓您可以輕鬆建立不同種類的縮放區塊(Toggles),並在網站上的任意位置插入,包括頁面/文章編輯器、側邊欄、樣板檔案。無需編碼,一切都在...。
  • Hide WP Toolbar 》這個 WordPress 外掛讓您能夠輕鬆地按下一個按鈕隱藏或顯示前端 WordPress 管理工具欄。此外掛在 WordPress 網站前端的管理區域外加入了一個特殊按鈕,只有在...。
  • Toggle Content 》Content Toggle 可以讓您以互動的方式展示關鍵內容,吸引訪客立即關注。使用這個 Toggle Content 外掛,您可以在 Gutenberg 編輯器中使用這個功能。, 非常容...。
  • Admin Bar Toggle 》Admin Bar toggle 外掛能夠在前端添加一個開關按鈕,以顯示/隱藏管理列。這樣做不會過於影響使用者體驗,同時還能充分利用管理列的方便功能。, , 預設情況下...。

文章
Filter
Mastodon