summaryrefslogtreecommitdiffstats
path: root/wp-inst
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-16 15:56:16 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-16 15:56:16 +0000
commit2a8eb7cb35db6adc0e7770222dc30be3d495df21 (patch)
tree5a21fd83a7eb50fe0a12e31377d269482bdd1306 /wp-inst
parent5a2a31f2d899d346b68599aaff0269832f4a72c5 (diff)
downloadwordpress-mu-2a8eb7cb35db6adc0e7770222dc30be3d495df21.tar.gz
wordpress-mu-2a8eb7cb35db6adc0e7770222dc30be3d495df21.tar.xz
wordpress-mu-2a8eb7cb35db6adc0e7770222dc30be3d495df21.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@570 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst')
-rw-r--r--wp-inst/wp-includes/deprecated.php5
-rw-r--r--wp-inst/wp-includes/general-template.php27
2 files changed, 14 insertions, 18 deletions
diff --git a/wp-inst/wp-includes/deprecated.php b/wp-inst/wp-includes/deprecated.php
index be08e24..39fca84 100644
--- a/wp-inst/wp-includes/deprecated.php
+++ b/wp-inst/wp-includes/deprecated.php
@@ -470,4 +470,9 @@ function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array(
return wp_set_post_categories($post_ID, $post_categories);
}
+function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
+ $args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
+ return wp_get_archives($args);
+}
+
?>
diff --git a/wp-inst/wp-includes/general-template.php b/wp-inst/wp-includes/general-template.php
index 4a80d8b..31111f9 100644
--- a/wp-inst/wp-includes/general-template.php
+++ b/wp-inst/wp-includes/general-template.php
@@ -275,26 +275,16 @@ function get_archives_link($url, $text, $format = 'html', $before = '', $after =
function wp_get_archives($args = '') {
- parse_str($args, $r);
- if ( !isset($r['type']) )
- $r['type'] = '';
- if ( !isset($r['limit']) )
- $r['limit'] = '';
- if ( !isset($r['format']) )
- $r['format'] = 'html';
- if ( !isset($r['before']) )
- $r['before'] = '';
- if ( !isset($r['after']) )
- $r['after'] = '';
- if ( !isset($r['show_post_count']) )
- $r['show_post_count'] = false;
-
- get_archives($r['type'], $r['limit'], $r['format'], $r['before'], $r['after'], $r['show_post_count']);
-}
+ global $wp_locale, $wpdb;
+ if ( is_array($args) )
+ $r = &$args;
+ else
+ parse_str($args, $r);
-function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
- global $wp_locale, $wpdb;
+ $defaults = array('type' => 'monthly', 'limit' => '', 'format' => 'html', 'before' => '', 'after' => '', 'show_post_count' => false);
+ $r = array_merge($defaults, $r);
+ extract($r);
if ( '' == $type )
$type = 'monthly';
@@ -303,6 +293,7 @@ function get_archives($type='', $limit='', $format='html', $before = '', $after
$limit = (int) $limit;
$limit = ' LIMIT '.$limit;
}
+
// this is what will separate dates on weekly archive links
$archive_week_separator = '&#8211;';