From fa6346e409070e77e0a6890ec1213d9056ce7055 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Mon, 23 May 2016 10:23:30 +0000 Subject: [PATCH] Template: In `wp_get_archives()` use `add_query_arg()` instead of `sprintf()` to build the archive URL. Props tloureiro. Fixes #36414. Built from https://develop.svn.wordpress.org/trunk@37530 git-svn-id: http://core.svn.wordpress.org/trunk@37498 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 4aa0cb896e..120d8e7e8b 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1790,7 +1790,7 @@ function wp_get_archives( $args = '' ) { $arc_week = get_weekstartend( $result->yyyymmdd, get_option( 'start_of_week' ) ); $arc_week_start = date_i18n( get_option( 'date_format' ), $arc_week['start'] ); $arc_week_end = date_i18n( get_option( 'date_format' ), $arc_week['end'] ); - $url = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&', '=', $result->week ); + $url = add_query_arg( array( 'm' => $arc_year, 'w' => $result->week, ), home_url( '/' ) ); if ( 'post' !== $r['post_type'] ) { $url = add_query_arg( 'post_type', $r['post_type'], $url ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0e7916821c..6ff80d420f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37529'; +$wp_version = '4.6-alpha-37530'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.