內容簡介
itter account and display them in a view template.
這個外掛提供了許多實用的小工具,對於開發人員和使用者來說都非常有用。它是採用 PHP 5 物件導向架構所撰寫的系統,因此非常適合進行修改和擴充。它包裝了 WordPress Widget API,提供了另一種、更強大的方法來進行鉤子(hook)和使用Widgets。Widgets是WordPress的使用者介面模組,已經支援管理和客戶端檢視。這個系統只是利用這點來實現更高的潛力。
這個外掛最初是我長期以來在許多專案中開發和使用的小工具集合。最後,我把它們合併成一個總體,現在就是所謂的「可擴充Widgets」外掛。目前我還沒有完整的外掛功能和程式碼庫的文檔。
簡而言之,這個外掛在當前狀態下是一個PHP widget類別管理器,同時也是一個實用的widgets類別集合,可擴充各個功能。當啟動這個外掛時,已包含的widget類別不會自動註冊,也不會出現在 WordPress Widgets管理頁面中。要啟用所需的widgets,必須轉到「可擴充Widgets」註冊頁面。從那裡開始可讀取短描述,然後註冊。
這個外掛還附帶有匯出和匯入頁面。您會注意到這個功能非常有用,可以備份所有widgets和「可擴充Widgets」設置的當前數據。我覺得這是非常必要的,因為當使用「可擴充Widgets」時,這些小數據突然變成了網站的主要方面。如果發生問題,我需要提供可接受的方法來檢索、備份和恢復這些數據。
最常用的widgets簡介如下:
Widget Group:使用此widget可以創建新的小工具組,那麼widget就變成了一個widget?是的......這才有趣。
Query Posts:一個widget可以創建和使用子查詢或使用當前全局查詢,並以視圖範本輸出結果。
Context:更多基本選項,對於任何小工具都很好,但是這個widget專門用於控制小工具出現的位置。
Widgets
這些是隨此外掛附帶的widgets,但是這些widgets都未預先註冊。這是為了讓您根據需要進行註冊。每個widget都建立在另一個widget的基礎上,您可以在「可擴充Widgets」註冊頁面上查看其層次結構。
Widget Base
「可擴充Widgets」的基礎,雖然本身沒有太多功能,但仍然可以作為一個有用的動態元素。
Context
更多基本選項,對於任何小工具都很好,但是這個widget專門用於控制小工具出現的位置。
View
使用視圖範本控制系統,傳遞自定義參數以以任何所需格式顯示數據。
Content
使用此widget可以輸入任何數據(例如:文本/HTML/XML/JavaScript),並在視圖模板中選擇是否訪問它。
Date
使用此widget可以選擇視圖模板,處理任何任意日期。
Widget Group
使用此widget可以創建新的小工具組,那麼widget就變成了一個widget?是的......這才有趣。
Query Posts
一個widget可以創建和使用子查詢或使用當前全局查詢,並以視圖範本輸出結果。
QP Extended
這是Query Posts widget的擴展版本,具有受控的表單。
使用此widget可以檢索指定Twitter帳戶的狀態,並以視圖範本顯示它們。
外掛標籤
開發者團隊
原文外掛簡介
In addition to adding numerous extremely useful widgets for developers and users alike, this plugin is a system written on a PHP 5 object oriented structure. In short, it is built for modification and extension. It wraps the WordPress Widget API to allow for an alternative, and in my opinion more robust method to hook into and use it. Widgets are WordPress’s version of user interface modules. They already support an administrative and client-side view. This system simply leverages that with a higher potential in mind.
This plugin started as a collection of widgets that I developed over time and used in numerous projects. I eventually merged them into one conglomerate which is now known as the ‘Extensible Widgets’ plugin. Currently I do not have extensive documentation on the plugin functionality and code-base yet.
A Quick summary is that this plugin in its current state is a PHP widget class manager, as well as a collection of useful widget classes that build on each other for extended functionality. When the plugin is first activated, the widget classes included are not registered automatically, and will not appear within your WordPress widgets administration page. To activate your desired widgets you must go to the ‘Extensible Widgets’ Registration page. From there you can read a short description before registering anything.
This plugin also comes with an Export and Import page. You will notice this functionality is very useful in backing up your current data of all your widgets and ‘Extensible Widgets’ settings. I felt this was a major necessity since while using ‘Extensible Widgets’ these little pieces of data suddenly turn into major aspects in the whole of your website. I needed to give an acceptable method of retrieving, backing up, and restoring that data if something bad happens.
A quick summary of the most useful of the widgets included:
Widget Group: Use this widget to create a new widget group, as a widget? Yes… this is where it gets interesting.
Query Posts: A Widget than can create and use a sub-query or use the current global query and output the results in a view template.
Context: More basic options that would be good for any widget, but this widget is specifically used for controlling where widgets appear.
Widgets
These are the widgets that come with this plugin. No widget here is pre-registered, this is to let you register them as needed. Each widgets builds on another’s functionality, and you may view the hierarchy from within the ‘Extensible Widgets’ registration page.
Widget Base
The base for ‘Extensible Widgets’ and not much on its own, it can still serve as a useful dynamic element.
Context
More basic options that would be good for any widget, but this widget is specifically used for controlling where widgets appear.
View
Use the view template control system and pass custom parameters to display data in any desired format.
Content
Use this widget to enter any data (ex: text/HTML/XML/JavaScript) and optionally access it within in a view template.
Date
Use this widget to select a view template and handle any arbitrary date.
Widget Group
Use this widget to create a new widget group, as a widget? Yes… this is where it gets interesting.
Query Posts
A Widget than can create and use a sub-query or use the current global query and output the results in a view template.
QP Extended
This is an extended version of the Query Posts widget with a controlled form.
Twitter
Use this widget to retrieve statuses from a specified twitter account.
