這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Page Siblings

外掛說明

Ever had to manage a WP install with many pages and subpages? This plugin does nothing more than adding a metabox to every post type that is hierarchical (that is pages and any other custom post type!) with a list of all page siblings, starting with the parent, so you can have:

News
|— History
|— Our Staff
|—— Employment Opportunities
|— Our Company

Bonus: when you’re listing posts on admin pages, you can also choose to display only parents.

API

You can choose to disable some (or all!) functionality by using filters. These filters are as following:

Disable page siblings metabox completely:

add_filter('iamntz/page-siblings/add-page-metabox', '__return_false')

For my-custom-post-type

add_filter("iamntz/page-siblings/add-page-metabox/post-type=my-custom-post-type", '__return_false')

Disable the dropdown that will allow you to filter page parents or page parents & children

add_filter('iamntz/page-siblings/add-hierarchy-column-filter', '__return_false')

For my-custom-post-type:

add_filter('iamntz/page-siblings/add-hierarchy-column-filter/post-type=my-custom-post-type', '__return_false')

Set the default value for the dropdown:

add_filter('iamntz/page-siblings/add-hierarchy-column-filter', function() { return 'parents_only'; })

For my-custom-post-type:

// The allowed values are `all` and `parents_only`.
add_filter('iamntz/page-siblings/hierarchy-column-filter-default/post-type=my-custom-post-type', function() { return 'parents_only'; })

螢幕擷圖

  • Page Siblings metabox

安裝方式

  1. Upload the page-siblings folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Done. You will see a box with page siblings when you edit a page

常見問題集

Installation Instructions
  1. Upload the page-siblings folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Done. You will see a box with page siblings when you edit a page

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Page Siblings〉的開發相關工作。

參與者

將〈Page Siblings〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0

  • Initial version

1.0.1

  • added a filtering option to page editing, so you can only display parent pages

1.0.2

  • tweaked code a little & removed PHP notices & warnings

1.0.3

  • Updated readme

1.0.4

  • added correct sorting for pages (thanks Jakob for pointing this)

1.0.5

  • We shouldn’t display filtering option on post types that aren’t hierarchical!

1.0.6

  • Version Bump

1.0.7

  • Added some filters to allow disabling some boxes