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
This commit is contained in:
Scott Taylor 2015-03-05 22:31:24 +00:00
parent ba977671b6
commit b8341a472d
2 changed files with 4 additions and 2 deletions

View File

@ -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 );

View File

@ -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.