Make WordPress Core


Ignore:
Timestamp:
04/10/2007 07:52:15 PM (17 years ago)
Author:
ryan
Message:

Tag clouds from mdawaffe. fixes #4129

File:
1 edited

Legend:

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

    r5200 r5234  
    14721472}
    14731473
     1474function wp_parse_args( $args, $defaults = '' ) {
     1475    if ( is_array($args) ) :
     1476        $r =& $args;
     1477    else :
     1478        parse_str( $args, $r );
     1479        if ( get_magic_quotes_gpc() )
     1480            $r = stripslashes_deep( $r );
     1481    endif;
     1482
     1483    if ( is_array($defaults) ) :
     1484        extract($defaults);
     1485        extract($r);
     1486        return compact(array_keys($defaults)); // only those options defined in $defaults
     1487    else :
     1488        return $r;
     1489    endif;
     1490}
     1491
    14741492?>
Note: See TracChangeset for help on using the changeset viewer.