WordPress.org

Make WordPress Core

Changeset 12327


Ignore:
Timestamp:
12/06/09 18:01:01 (4 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r12208 r12327  
    747747    $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']); 
    748748 
    749     // Allow plugins to filter an array of excluded pages 
    750     $r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude']))); 
     749    // Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array) 
     750    $exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array(); 
     751    $r['exclude'] = implode( ',', apply_filters('wp_list_pages_excludes', $exclude_array) ); 
    751752 
    752753    // Query pages. 
Note: See TracChangeset for help on using the changeset viewer.