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

git-svn-id: http://svn.automattic.com/wordpress/trunk@12327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2009-12-06 18:01:01 +00:00
parent ba3275b123
commit ef1593e6da
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 // sanitize, mostly to keep spaces out
$r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']); $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']);
// Allow plugins to filter an array of excluded pages // Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array)
$r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude']))); $exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array();
$r['exclude'] = implode( ',', apply_filters('wp_list_pages_excludes', $exclude_array) );
// Query pages. // Query pages.
$r['hierarchical'] = 0; $r['hierarchical'] = 0;