Plugin Directory

Changeset 2868977

Timestamp:
02/21/2023 08:47:32 PM (18 months ago)
Author:
husobj
Message:

Version 1.7.6

Location:
list-pages-shortcode/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • list-pages-shortcode/trunk/list-pages-shortcode.php

    r2849072 r2868977  
    66 * 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.
    77 * Author: Ben Huson, Aaron Harp
    8  * Version: 1.7.6
     8 * Version: 1.7.
    99 * Author URI: http://www.aaronharp.com
    1010 */
     
    169169        );
    170170
    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 );
    173178        }
    174179
  • list-pages-shortcode/trunk/readme.txt

    r2849072 r2868977  
    55Requires at least: 4.4.0
    66Tested up to: 6.1.1
    7 Stable tag: 1.7.6
     7Stable tag: 1.7.
    88License: GPLv2 or later
    99
     
    7070
    7171== Changelog ==
     72
     73
     74
     75
    7276
    7377= 1.7.6 =
     
    144148== Upgrade Notice ==
    145149
     150
     151
     152
     153
     154
    146155= 1.7.6 =
    147156
Note: See TracChangeset for help on using the changeset viewer.