From b8341a472d55b85ae0a1f1742b72acae23250fad Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 5 Mar 2015 22:31:24 +0000 Subject: [PATCH] When adding `post_type` to `$sendback` in `wp-admin/post.php`, use `add_query_arg()` instead of string concatenation. Props podpirate. Fixes #31492. Built from https://develop.svn.wordpress.org/trunk@31633 git-svn-id: http://core.svn.wordpress.org/trunk@31614 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/post.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index 01d703dd2d..0c38b5631e 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -95,7 +95,9 @@ if ( ! $sendback || $sendback = admin_url( 'upload.php' ); } else { $sendback = admin_url( 'edit.php' ); - $sendback .= ( ! empty( $post_type ) ) ? '?post_type=' . $post_type : ''; + if ( ! empty( $post_type ) ) { + $sendback = add_query_arg( 'post_type', $post_type, $sendback ); + } } } else { $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), $sendback ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 85dd53b7d0..f596d6cf44 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31632'; +$wp_version = '4.2-alpha-31633'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.