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
This commit is contained in:
parent
e5dd89ae57
commit
fa6346e409
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue