Make WordPress Core


Ignore:
Timestamp:
06/14/2007 10:46:59 PM (17 years ago)
Author:
ryan
Message:

wp_parse_str() from mdawaffe. see #4467

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r5705 r5709  
    605605    }
    606606
    607     parse_str($query, $qs);
    608     if ( get_magic_quotes_gpc() )
    609         $qs = stripslashes_deep($qs); // parse_str() adds slashes if magicquotes is on.  See: http://php.net/parse_str
     607    wp_parse_str($query, $qs);
    610608    $qs = urlencode_deep($qs);
    611609    if ( is_array(func_get_arg(0)) ) {
     
    12891287
    12901288function wp_parse_args( $args, $defaults = '' ) {
    1291     if ( is_array( $args ) ) {
     1289    if ( is_array( $args ) )
    12921290        $r =& $args;
    1293     } else {
    1294         parse_str( $args, $r );
    1295         if ( get_magic_quotes_gpc() ) {
    1296             $r = stripslashes_deep( $r );
    1297         }
    1298     }
    1299 
    1300     if ( is_array( $defaults ) ) {
     1291    else
     1292        wp_parse_str( $args, $r );
     1293
     1294    if ( is_array( $defaults ) )
    13011295        return array_merge( $defaults, $r );
    1302     } else {
     1296    else
    13031297        return $r;
    1304     }
    13051298}
    13061299
Note: See TracChangeset for help on using the changeset viewer.