Get rid of stray comma. fixes #10977. props kevinB

git-svn-id: https://develop.svn.wordpress.org/trunk@12327 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2009-12-06 18:01:01 +00:00
parent 5831826b77
commit dd1d1be280
1 changed files with 3 additions and 2 deletions

View File

@ -746,8 +746,9 @@ function wp_list_pages($args = '') {
// sanitize, mostly to keep spaces out
$r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']);
// Allow plugins to filter an array of excluded pages
$r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude'])));
// Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array)
$exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array();
$r['exclude'] = implode( ',', apply_filters('wp_list_pages_excludes', $exclude_array) );
// Query pages.
$r['hierarchical'] = 0;