When adding post_type to $sendback in wp-admin/post.php, use add_query_arg() instead of string concatenation.

Props podpirate.
Fixes #31492.


git-svn-id: https://develop.svn.wordpress.org/trunk@31633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-03-05 22:30:32 +00:00
parent b44cf676b1
commit 78bab0c4eb

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