Use wp_parse_args(). fixes #4237

git-svn-id: https://develop.svn.wordpress.org/trunk@5444 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n
2007-05-11 03:10:05 +00:00
parent 90cd098abe
commit c213997f48
10 changed files with 195 additions and 191 deletions
+10 -10
View File
@@ -313,16 +313,16 @@ function get_archives_link($url, $text, $format = 'html', $before = '', $after =
function wp_get_archives($args = '') {
global $wp_locale, $wpdb;
if ( is_array($args) )
$r = &$args;
else
parse_str($args, $r);
$defaults = array('type' => 'monthly', 'limit' => '', 'format' => 'html', 'before' => '', 'after' => '', 'show_post_count' => false);
$r = array_merge($defaults, $r);
extract($r);
global $wpdb;
$defaults = array(
'type' => 'monthly', 'limit' => '',
'format' => 'html', 'before' => '',
'after' => '', 'show_post_count' => false
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
if ( '' == $type )
$type = 'monthly';