Bit of clean-up.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-05-09 04:19:19 +00:00
parent 627725be1a
commit 1e30a12eb5
1 changed files with 14 additions and 11 deletions

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() {