Ticket #10977: wp_list_pages-no_leading_exclude_comma.patch
File wp_list_pages-no_leading_exclude_comma.patch, 774 bytes (added by , 15 years ago) |
---|
-
post-template.php
757 757 // sanitize, mostly to keep spaces out 758 758 $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']); 759 759 760 // Allow plugins to filter an array of excluded pages 761 $r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude']))); 760 // Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array) 761 $exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array(); 762 $r['exclude'] = implode( ',', apply_filters('wp_list_pages_excludes', $exclude_array) ); 762 763 763 764 // Query pages. 764 765 $r['hierarchical'] = 0;