mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 06:40:25 +00:00
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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user