[WordPress] 外掛分享: Child Order

首頁外掛目錄 › Child Order
10+
安裝啟用
尚無評分
4324 天前
最後更新
問題解決
WordPress 3.0+ v1.1 上架:2014-05-15

內容簡介

此外掛在編輯頁面中增加了一個管理面板,可讓您重新排列此頁面的子頁面並開啟或關閉它們的顯示。

這僅會影響顯示指向子頁面的連結清單的佈景主題部分,且僅影響具有 menu_order 設定的佈景主題。它不會影響選單。您需要使用現有的選單介面編輯那些。

實際顯示子頁面清單並不在此外掛的範圍內 - 有許多佈景主題和外掛可提供這項功能。

開發人員

對於開發人員,此外掛提供了許多可用於添加欄位和行為的鉤子。

顯示元框時:

child_order_before_list – 在管理區域中撰寫子頁面列表之前呼叫的動作
child_order_before_item ($post) – 在每個項目開始時呼叫的動作
child_order_after_item ($post) – 在每個項目結束時呼叫的動作
child_order_after_list – 在完整清單撰寫後呼叫的動作
child_order_item_title ($title, $post) – 控制顯示項目標題的過濾器
child_order_message ($message) – 控制顯示清單後的訊息的過濾器

儲存時(在 AJAX 中):

child_order_children ($array, $parent_id) – 在儲存之前調整文章 ID 清單的過濾器
child_order_before_save ($array, $parent_id) – 在儲存項目順序之前呼叫的動作
child_order_save_item ($id, $menu_order) – 在儲存每個項目時呼叫的動作
child_order_after_save ($array, $parent_id) – 在儲存項目順序之後呼叫的動作

如果要從輸出中刪除「編輯」和「檢視」按鈕,請在設置時調用此方法:

remove_action('child_order_after_item', 'child_order_after_item_edit_link');

請注意,此外掛的內部運作方式可能會更改,因此這些鉤子的名稱和詳細資訊將來可能會更改。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1) 或搜尋安裝

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

原文外掛簡介

Adds an admin panel when editing edit pages, to let you rearrange this page’s child pages and switch their display on/off.
This will only affect parts of your theme that display a list of links to child pages, and only those which respect the menu_order setting. It has no effect on Menus. You need to edit those with the existing menu interface.
Actually displaying the list of child pages is outside the scope of this plugin – there are plenty of themes and plugins that do that.
Developers
For developers, there are a lot of hooks exposed by this plugin, which you can use to add fields and behaviours
When displaying the meta box:

child_order_before_list – Action called before writing the list of child pages in the admin area
child_order_before_item ($post) – Action called at the start of each item
child_order_after_item ($post) – Action called at the end of each item
child_order_after_list – Action called after writing the whole list
child_order_item_title ($title, $post) – Filter to control the title displayed for an item
child_order_message ($message) – Filter to control the message displayed after the list

When saving (in AJAX):

child_order_children ($array, $parent_id) – Filter to adjust the list of post IDs before saving
child_order_before_save ($array, $parent_id) – Action called before saving the order of items
child_order_save_item ($id, $menu_order) – Action called on saving each item
child_order_after_save ($array, $parent_id) – Action called after saving the order of items

If you wish to remove the “Edit” and “View” buttons from the output, call this on setup:
remove_action('child_order_after_item', 'child_order_after_item_edit_link');

Be aware that the internal workings of the plugin are subject to change,
so the names and details of these hooks may change in future version.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon