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

Sort Page List by Last Name

描述

Aimed at archivists and other WordPress developers who use the names of individuals as page titles, this plugin sorts wp_list_pages-generated page lists by last name. More generally, the plugin can also be used to sort wp_list_pages-generated page lists by the last word of any page’s title.

安裝

After installing and activating, developers can order any wp_list_pages-generated page list by surname — or, more generally, last word — using the sortbylastname=1 parameter, e.g., <?php wp_list_pages('title_li=&sortbylastname=1'); ?>. Use a “0” to (temporarily) disable the plugin.

常見問題

Links
  • For feedback and help, visit: http://getsatisfaction.com/studio_hyperset/products/studio_hyperset_wordpress_plugins

  • To learn about other Studio Hyperset WordPress plugins, visit http://studiohyperset.com/#solutions

  • To help develop the Sort Page List by Last Name plugin, visit https://github.com/studiohyperset/sort-page-list-by-last-name

Developer Notes

PLEASE NOTE: Line 14 extracts each separate line of HTML from the original wp_list_pages output and puts it into an array called $lines. The \n parameter tells the explode command that each line ends with a carriage return. However, as of WordPress 3.2.1, the explode command assumes each line ends when it finds an n. As such, if developers edit the plugin using the WordPress code editor, they should add an extra backslash (\) in front of the n before saving the file (e.g, $lines = explode("\\n", $val);). The line will revert to $lines = explode("\n", $val); on save.

Interested in helping develop the Sort Page List by Last Name plugin? Visit the GitHub repository: https://github.com/studiohyperset/sort-page-list-by-last-name

評價

There are no reviews for this plugin.

貢獻者及開發者

“Sort Page List by Last Name” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Sort Page List by Last Name 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

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

修改日誌

1.0

  • 12/3/11 – Initial release