Changeset 2868977
- Timestamp:
- 02/21/2023 08:47:32 PM (18 months ago)
- Location:
- list-pages-shortcode/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
list-pages-shortcode/trunk/list-pages-shortcode.php
r2849072 r2868977 6 6 * Description: Introduces the [list-pages], [sibling-pages] and [child-pages] <a href="http://codex.wordpress.org/Shortcode_API">shortcodes</a> for easily displaying a list of pages within a post or page. Both shortcodes accept all parameters that you can pass to the <a href="http://codex.wordpress.org/Template_Tags/wp_list_pages">wp_list_pages()</a> function. For example, to show a page's child pages sorted by title simply add [child-pages sort_column="post_title"] in the page's content. 7 7 * Author: Ben Huson, Aaron Harp 8 * Version: 1.7. 68 * Version: 1.7. 9 9 * Author URI: http://www.aaronharp.com 10 10 */ … … 169 169 ); 170 170 171 if ( in_array( $sort_column, $valid_columns ) ) { 172 return $sort_column; 171 $sort_columns = explode( ',', $sort_column ); 172 $sort_columns = array_map( 'trim', $sort_columns ); 173 174 $validated_columns = array_intersect( $sort_columns, $valid_columns ); 175 176 if ( ! empty( $validated_columns ) ) { 177 return implode( ',', $validated_columns ); 173 178 } 174 179 -
list-pages-shortcode/trunk/readme.txt
r2849072 r2868977 5 5 Requires at least: 4.4.0 6 6 Tested up to: 6.1.1 7 Stable tag: 1.7. 67 Stable tag: 1.7. 8 8 License: GPLv2 or later 9 9 … … 70 70 71 71 == Changelog == 72 73 74 75 72 76 73 77 = 1.7.6 = … … 144 148 == Upgrade Notice == 145 149 150 151 152 153 154 146 155 = 1.7.6 = 147 156
Note: See TracChangeset
for help on using the changeset viewer.