mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-26 06:13:07 +02:00
Don't discard non-default args in wp_parse_args(). see #4237
git-svn-id: http://svn.automattic.com/wordpress/trunk@5428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
28f3106ee9
commit
56a1232923
@ -1500,11 +1500,7 @@ function wp_parse_args( $args, $defaults = '' ) {
|
||||
}
|
||||
|
||||
if ( is_array( $defaults ) ) {
|
||||
extract( $defaults );
|
||||
extract( $r );
|
||||
// Note: this only returns the variables that were in $defaults
|
||||
// to begin with. All other variables are discarded.
|
||||
return compact( array_keys( $defaults ) );
|
||||
return array_merge( $defaults, $r );
|
||||
} else {
|
||||
return $r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user