前言介紹
- 這款 WordPress 外掛「Widgets in Menu for WordPress」是 2014-10-20 上架。
- 目前有 10000 個安裝啟用數。
- 上一次更新是 2018-06-27,距離現在已有 2503 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.5 以上版本才可以安裝。
- 有 21 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
menus | widgets | custom link |
內容簡介
這個外掛可以讓您透過在自訂小工具區域和選單編輯畫面中的額外方塊,將小工具加入 WordPress 導覽選單中。
警告
為了讓小工具正確顯示在導覽選單中,您需要具備一些 CSS 技能。
使用方式
請查看截圖以獲得使用說明。
原始程式碼和貢獻
在 Github 上派生
我們非常歡迎貢獻。
文件
大部分文件都在內嵌中。
鉤子(動作和過濾器)在其他注意事項中有記錄。
一些有用的資訊在常見問題解答部分中。
鉤子
動作
yawp_wim_pre_callback
在小工具顯示回呼函式呼叫之前觸發。類似於 ‘dynamic_sidebar’ 動作。
參數
$yawp_wim_widget array 一個小工具引數的關聯陣列。
string $name 小工具的名稱。
string $id 小工具的 ID。
array|callback $callback 當鉤子在前端被觸發時,$callback 是一個包含小工具物件的陣列。當在後端被觸發時,$callback 是 ‘wp_widget_control’,請參見 $_callback。
array $params 多重小工具引數的關聯陣列。
string $classname 套用到小工具容器的 CSS 類別。
string $description 小工具的描述。
array $_callback 當鉤子在後端被觸發時,$_callback 會被填充成一個包含小工具物件的陣列,請參見 $callback。
過濾器
yawp_wim_attribute_prefix
過濾 HTML 顯示中使用的類別/id 屬性中使用的前綴。
參數
$default_prefix string 預設前綴:‘yawp_wim’
yawp_wim_widget_params
過濾傳遞至小工具顯示回呼函式的引數。類似於 ‘dynamic_sidebar_params’ 過濾器
參數
$params array
array $args 包含小工具顯示引數的陣列。
string $name 小工具所分配的邊欄名稱。
string $id 小工具所分配的邊欄 ID。
string $description 邊欄描述。
string $class 套用到邊欄容器的 CSS 類別。
string $before_widget 在邊欄中每個小工具之前加入的 HTML 標記。
string $after_widget 在邊欄中每個小工具之後加入的 HTML 標記。
string $before_title 在顯示小工具標題時加入的 HTML 標記。
string $after_title 在顯示小工具標題時加入的 HTML 標記。
string $widget_id 小工具的 ID。
string $widget_name 小工具名稱。 }
array $widget_args 包含多個小工具引數的關聯陣列。
int $number 用於同一小工具的多個複本的數量增量。
yawp_wim_no_widgets_message
過濾在邊欄中未顯示小工具時顯示的 HTML。
參數
$no_widgets_output array 預設輸出
原文外掛簡介
Allows you to add Widgets in WordPress Navigation Menus via a custom widget area and an extra box in menu edit screen.
Warning
You will need to have some CSS skills for the widgets to display properly in nav menus.
Usage
View the screenshots for usage instructions.
Source code and Contributions
Fork on Github
Contributions are always welcome
Documentation
Most documentation is inline.
The hooks (actions and filters) are documented in the Other Notes.
Some useful stuff is in the FAQ section.
Hooks
Actions
yawp_wim_pre_callback
Fires before a widget’s display callback is called. Similar to ‘dynamic_sidebar’ action.
Parameters
$yawp_wim_widget array An associative array of widget arguments.
string $name Name of the widget.
string $id Widget ID.
array|callback $callback When the hook is fired on the front-end, $callback is an array containing the widget object. Fired on the back-end, $callback is ‘wp_widget_control’, see $_callback.
array $params An associative array of multi-widget arguments.
string $classname CSS class applied to the widget container.
string $description The widget description.
array $_callback When the hook is fired on the back-end, $_callback is populated with an array containing the widget object, see $callback.
Filters
yawp_wim_attribute_prefix
Filters the prefix used in class/id attributes in html display.
Parameters
$default_prefix string The default prefix: ‘yawp_wim’
yawp_wim_widget_params
Filter the parameters passed to the widget’s display callback. Similar to ‘dynamic_sidebar_params’ filter
Parameters
$params array
array $args An array of widget display arguments.
string $name Name of the sidebar the widget is assigned to.
string $id ID of the sidebar the widget is assigned to.
string $description The sidebar description.
string $class CSS class applied to the sidebar container.
string $before_widget HTML markup to prepend to each widget in the sidebar.
string $after_widget HTML markup to append to each widget in the sidebar.
string $before_title HTML markup to prepend to the widget title when displayed.
string $after_title HTML markup to append to the widget title when displayed.
string $widget_id ID of the widget.
string $widget_name Name of the widget. }
array $widget_args An array of multi-widget arguments.
int $number Number increment used for multiples of the same widget.
yawp_wim_no_widgets_message
Filters the html displayed if no widgets are present in the sidebar.
Parameters
$no_widgets_output array The default output
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Widgets in Menu for WordPress」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.0.1 | 0.1.0 | 0.1.1 | 0.2.0 | 0.2.1 | 1.0.0 |
延伸相關外掛(你可能也想知道)
One Click Demo Import 》這個外掛的最佳功能在於主題作者可以在他們的主題中定義導入文件,所以所有使用該主題的用戶只需點擊「導入演示數據」按鈕即可。, , 你是主題作者嗎?, 為你...。
Premium Addons for Elementor 》使用超過60個高度可自訂的外掛和小工具以及400多個預製範本,讓你能夠無需編碼更快地建立複雜的網站,提升你的Elementor頁面建構器的能力。Elementor和Premiu...。
Ocean Extra 》mplates IMPORT, With Ocean Extra, you get access to a wide range of both free and premium website templates to import to your website with a single...。
SiteOrigin Widgets Bundle 》rdPress website since 2013. Our Widgets Bundle is actively developed and regularly updated to ensure compatibility with the latest WordPress update...。
Jeg Elementor Kit 》這是為了 Elementor 頁面建構器所設計的額外小工具,它包含 40 種高度可自訂的小工具。, 必要小工具, 我們提供小工具,您可以按照自己的需求進行自訂。, , 手...。
Blocksy Companion 》Blocksy Companion 是一個外掛,將 Blocksy 主題轉化為強大的瑞士軍刀工具。, 只有在安裝並啟用 Blocksy 主題時,它才會運行並添加增強功能。, 最小需求, , W...。
WooSidebars 》使用 WooSidebars,您可以根據情境(例如特定頁面、特定博客文章、某些類別或搜尋結果屏幕)更改顯示在側邊欄(小部件區域)中的小部件。設置顯示在多個條件...。
Widget Importer & Exporter 》Widget Importer & Exporter 是一個有用的外掛,可將小工具從一個WordPress站點移動到另一個站點,備份小工具,並供主題開發人員為用戶提供範例小工具。...。
Unyson 》, 您覺得這款外掛有幫助嗎?請考慮給它一個五星評價。, , Unyson - 一個免費的拖放框架,附帶許多內建的擴充功能,可以協助您輕鬆快速地開發高級主題。, 贊助...。
Orbit Fox by ThemeIsle 》透過Orbit Fox,您可以使用各種模組擴充您的主題功能,例如社交媒體分享按鈕和圖示、自訂選單圖示、頁首和頁尾腳本、一鍵導入頁面模板、頁面建構器附加元件和...。
Widget CSS Classes 》Widget CSS Classes 可以讓您給 WordPress Widget 添加自定義的 class 和 id, 請注意,此外掛並不支援輸入自定義的 CSS。您需要修改主題的 style.css,或加入...。
Lightweight Sidebar Manager 》通常您會在網站上看到一個側邊欄,但有時需要在特定頁面上顯示相關的不同側邊欄。例如,在 WooCommerce 頁面上,顯示相關或熱門產品的側邊欄比最新評論或博客...。
Sidebar Widgets by CodeLights 》❗ 很抱歉,由於 SiteOrigin 的 widgets API 完全更改,CodeLights 不再支援 SiteOrigin Page Builder 的原生使用。解決方案:您仍然可以在純文字編輯器中創...。
Widget Context 》使用 Widget Context 外掛在網站的特定部分 (如首頁、文章、頁面、檔案、搜尋等) 中顯示或隱藏小工具。該外掛可支援使用 URL 定位來達到最大的彈性。, , 高級...。
UiCore Elements – Free Elementor widgets and templates 》```html, , , , ,
UiCore Elements 外掛總結:
,UiCore Elements 是一個多功...。