mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Don't discard non-default args in wp_parse_args(). see #4237
git-svn-id: https://develop.svn.wordpress.org/trunk@5428 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user