WordPress.org

Make WordPress Core

Changeset 31624


Ignore:
Timestamp:
03/05/2015 03:58:02 PM (7 years ago)
Author:
wonderboymusic
Message:

detached affects the wp() call for the media list table, so switch our new $_GET key to detach.

See #6820.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

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

    r31619 r31624  
    30593059        if ( $referer = wp_get_referer() ) {
    30603060            if ( false !== strpos( $referer, 'upload.php' ) ) {
    3061                 $location = remove_query_arg( array( 'attached', 'detached' ), $referer );
     3061                $location = remove_query_arg( array( 'attached', 'detach' ), $referer );
    30623062            }
    30633063        }
    30643064
    3065         $key = 'attach' === $action ? 'attached' : 'detached';
     3065        $key = 'attach' === $action ? 'attached' : 'detach';
    30663066        $location = add_query_arg( array( $key => $result ), $location );
    30673067        wp_redirect( $location );
  • trunk/src/wp-admin/upload.php

    r31619 r31624  
    226226if ( ! empty( $_GET['attached'] ) && $attached = absint( $_GET['attached'] ) ) {
    227227    $message = sprintf( _n('Reattached %d attachment.', 'Reattached %d attachments.', $attached), $attached );
    228     $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detached', 'attached' ), $_SERVER['REQUEST_URI'] );
    229 }
    230 
    231 if ( ! empty( $_GET['detached'] ) && $detached = absint( $_GET['detached'] ) ) {
     228    $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] );
     229}
     230
     231if ( ! empty( $_GET['detach'] ) && $detached = absint( $_GET['detach'] ) ) {
    232232    $message = sprintf( _n( 'Detached %d attachment.', 'Detached %d attachments.', $detached ), $detached );
    233     $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detached', 'attached' ), $_SERVER['REQUEST_URI'] );
     233    $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] );
    234234}
    235235
Note: See TracChangeset for help on using the changeset viewer.