开发者 |
studiohyperset
oqm4 ryanajarrett |
---|---|
更新时间 | 2020年4月4日 03:22 |
捐献地址: | 去捐款 |
PHP版本: | 3.0 及以上 |
WordPress版本: | 5.4 |
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.
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.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