Changeset 5428

Show
Ignore:
Timestamp:
05/10/07 02:33:01 (2 years ago)
Author:
rob1n
Message:

Don't discard non-default args in wp_parse_args(). see #4237

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/functions.php

    r5415 r5428  
    15011501     
    15021502    if ( is_array( $defaults ) ) { 
    1503         extract( $defaults ); 
    1504         extract( $r ); 
    1505         // Note: this only returns the variables that were in $defaults  
    1506         // to begin with. All other variables are discarded. 
    1507         return compact( array_keys( $defaults ) ); 
     1503        return array_merge( $defaults, $r ); 
    15081504    } else { 
    15091505        return $r;