wp_parse_str() from mdawaffe. see #4467

git-svn-id: https://develop.svn.wordpress.org/trunk@5709 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-06-14 22:46:59 +00:00
parent 09da00f7fe
commit 6b7bc3b1b6
3 changed files with 31 additions and 34 deletions

View File

@@ -604,9 +604,7 @@ function add_query_arg() {
$query = $uri;
}
parse_str($query, $qs);
if ( get_magic_quotes_gpc() )
$qs = stripslashes_deep($qs); // parse_str() adds slashes if magicquotes is on. See: http://php.net/parse_str
wp_parse_str($query, $qs);
$qs = urlencode_deep($qs);
if ( is_array(func_get_arg(0)) ) {
$kayvees = func_get_arg(0);
@@ -1288,20 +1286,15 @@ function smilies_init() {
}
function wp_parse_args( $args, $defaults = '' ) {
if ( is_array( $args ) ) {
if ( is_array( $args ) )
$r =& $args;
} else {
parse_str( $args, $r );
if ( get_magic_quotes_gpc() ) {
$r = stripslashes_deep( $r );
}
}
else
wp_parse_str( $args, $r );
if ( is_array( $defaults ) ) {
if ( is_array( $defaults ) )
return array_merge( $defaults, $r );
} else {
else
return $r;
}
}
function wp_maybe_load_widgets() {
@@ -1324,4 +1317,4 @@ function wp_ob_end_flush_all()
while ( @ob_end_flush() );
}
?>
?>