Changeset 2846366
- Timestamp:
- 01/10/2023 08:10:21 PM (19 months ago)
- Location:
- list-pages-shortcode/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
list-pages-shortcode/trunk/list-pages-shortcode.php
r1358037 r2846366 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. 48 Version: 1.7. 9 9 Author URI: http://www.aaronharp.com 10 10 */ … … 81 81 $atts = apply_filters( 'shortcode_list_pages_attributes', $atts, $content, $tag ); 82 82 83 84 85 83 86 // Catch <ul> tags in wp_list_pages() 84 87 $atts['list_type'] = self::validate_list_type( $atts['list_type'] ); … … 95 98 remove_filter( 'wp_list_pages', array( 'List_Pages_Shortcode', 'ul2list_type' ), 10 ); 96 99 if ( ! empty( $out ) && ! empty( $atts['list_type'] ) ) { 97 $out = '<' . $atts['list_type'] . ' class="' . $atts['class']. '">' . $out . '</' . $atts['list_type'] . '>';100 $out = '<' . $atts['list_type'] . ' class="' . . '">' . $out . '</' . $atts['list_type'] . '>'; 98 101 } 99 102 $out = apply_filters( 'shortcode_list_pages', $out, $atts, $content, $tag ); … … 144 147 static function excerpt_filter( $text ) { 145 148 if ( ! empty( $text ) ) { 146 return ' <div class="excerpt">' . $text. '</div>';149 return ' <div class="excerpt">' . . '</div>'; 147 150 } 148 151 return $text; -
list-pages-shortcode/trunk/readme.txt
r2185982 r2846366 4 4 Tags: shortcodes, pages, list pages, sibling pages, child pages, subpages 5 5 Requires at least: 3.5 6 Tested up to: 5.27 Stable tag: 1.7. 46 Tested up to: 7 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.4 = … … 136 140 == Upgrade Notice == 137 141 142 143 144 145 138 146 = 1.7.2 = 139 147 Add short code arguments to the shortcode_list_pages_before/after actions.
Note: See TracChangeset
for help on using the changeset viewer.