Make WordPress Core


Ignore:
Timestamp:
05/11/2007 03:10:05 AM (18 years ago)
Author:
rob1n
Message:

Use wp_parse_args(). fixes #4237

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r5433 r5444  
    314314
    315315function wp_get_archives($args = '') {
    316     global $wp_locale, $wpdb;
    317 
    318     if ( is_array($args) )
    319         $r = &$args;
    320     else
    321         parse_str($args, $r);
    322 
    323     $defaults = array('type' => 'monthly', 'limit' => '', 'format' => 'html', 'before' => '', 'after' => '', 'show_post_count' => false);
    324     $r = array_merge($defaults, $r);
    325     extract($r);
     316    global $wpdb;
     317   
     318    $defaults = array(
     319        'type' => 'monthly', 'limit' => '',
     320        'format' => 'html', 'before' => '',
     321        'after' => '', 'show_post_count' => false
     322    );
     323   
     324    $r = wp_parse_args( $args, $defaults );
     325    extract( $r );
    326326
    327327    if ( '' == $type )
Note: See TracChangeset for help on using the changeset viewer.