Bit of clean-up.

git-svn-id: https://develop.svn.wordpress.org/trunk@5415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n
2007-05-09 04:19:19 +00:00
parent 23018b434d
commit 13d4d782a5

View File

@@ -1490,21 +1490,24 @@ function smilies_init() {
}
function wp_parse_args( $args, $defaults = '' ) {
if ( is_array($args) ) :
if ( is_array( $args ) ) {
$r =& $args;
else :
} else {
parse_str( $args, $r );
if ( get_magic_quotes_gpc() )
if ( get_magic_quotes_gpc() ) {
$r = stripslashes_deep( $r );
endif;
if ( is_array($defaults) ) :
extract($defaults);
extract($r);
return compact(array_keys($defaults)); // only those options defined in $defaults
else :
}
}
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 ) );
} else {
return $r;
endif;
}
}
function wp_maybe_load_widgets() {