WordPress.org

Make WordPress Core

Changeset 31633


Ignore:
Timestamp:
03/05/2015 10:30:32 PM (3 years ago)
Author:
wonderboymusic
Message:

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

Props podpirate.
Fixes #31492.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/post.php

    r31121 r31633  
    9696    } else {
    9797        $sendback = admin_url( 'edit.php' );
    98         $sendback .= ( ! empty( $post_type ) ) ? '?post_type=' . $post_type : '';
     98        if ( ! empty( $post_type ) ) {
     99            $sendback = add_query_arg( 'post_type', $post_type, $sendback );
     100        }
    99101    }
    100102} else {
Note: See TracChangeset for help on using the changeset viewer.