[WordPress] 外掛分享: Widget Instance

首頁外掛目錄 › Widget Instance
WordPress 外掛 Widget Instance 的封面圖片
500+
安裝啟用
★★★☆☆
3.4/5 分(9 則評價)
2809 天前
最後更新
問題解決
WordPress 2.9.1+ v0.9.4 上架:2012-06-10

內容簡介

小工具通常使用 dynamic_sidebar() 函數作為側邊欄的一部分顯示。
靜態小工具有 the_widget 函數,但在外觀 > 小工具區域配置的特定小工具並沒有相對應的函數。

Widget Instance 外掛可讓所有能力的 WordPress 使用者顯示這些小工具,而不限於它們被指定的側邊欄。

功能

一個所選可用小工具的所見即所得編輯器按鈕
一個短碼 [widget_instance id=”[widget_id]”]
主題動作 do_action(‘widget_instance’, [widget_id])
開發人員的實用函數 get_widget_instance 和 widget_instance

用法

[widget_instance id=”[widget_id]”]
do_action(‘widget_instance’, ‘[widget_id]’);
the_widget_instance(‘[widget_id]’);
get_the_widget_instance(‘[widget_id]’);

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.9.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Widget Instance」→ 直接安裝(推薦)

原文外掛簡介

Widgets are normally displayed as part of a sidebar using the dynamic_sidebar()
function. There is the_widget function for static widgets, but there is no
equivalent for specific widgets configured in the Appearance > Widgets area.
The Widget Instance plugin allows WordPress users of all abilities to display
these widgets outside of the sidebars they have been assigned to.
Features

A wysiwyg editor button for selecting available widgets,
A shortcode [widget_instance id=”[widget_id]”],
A theme action do_action(‘widget_instance’, [widget_id]) and finally
Utility functions for developers get_widget_instance and widget_instance

Usage

[widget_instance id=”[widget_id]”]
do_action(‘widget_instance’, ‘[widget_id]’);
the_widget_instance(‘[widget_id]’);
get_the_widget_instance(‘[widget_id]’);

文章
Filter
Apply Filters
Mastodon