mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
detached
affects the wp()
call for the media list table, so switch our new $_GET
key to detach
.
See #6820. Built from https://develop.svn.wordpress.org/trunk@31624 git-svn-id: http://core.svn.wordpress.org/trunk@31605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ec26a08d3c
commit
f9c138b4c4
@ -3058,11 +3058,11 @@ function wp_media_attach_action( $parent_id, $action = 'attach' ) {
|
||||
$location = 'upload.php';
|
||||
if ( $referer = wp_get_referer() ) {
|
||||
if ( false !== strpos( $referer, 'upload.php' ) ) {
|
||||
$location = remove_query_arg( array( 'attached', 'detached' ), $referer );
|
||||
$location = remove_query_arg( array( 'attached', 'detach' ), $referer );
|
||||
}
|
||||
}
|
||||
|
||||
$key = 'attach' === $action ? 'attached' : 'detached';
|
||||
$key = 'attach' === $action ? 'attached' : 'detach';
|
||||
$location = add_query_arg( array( $key => $result ), $location );
|
||||
wp_redirect( $location );
|
||||
exit;
|
||||
|
@ -225,12 +225,12 @@ if ( ! empty( $_GET['posted'] ) ) {
|
||||
|
||||
if ( ! empty( $_GET['attached'] ) && $attached = absint( $_GET['attached'] ) ) {
|
||||
$message = sprintf( _n('Reattached %d attachment.', 'Reattached %d attachments.', $attached), $attached );
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detached', 'attached' ), $_SERVER['REQUEST_URI'] );
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] );
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['detached'] ) && $detached = absint( $_GET['detached'] ) ) {
|
||||
if ( ! empty( $_GET['detach'] ) && $detached = absint( $_GET['detach'] ) ) {
|
||||
$message = sprintf( _n( 'Detached %d attachment.', 'Detached %d attachments.', $detached ), $detached );
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detached', 'attached' ), $_SERVER['REQUEST_URI'] );
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] );
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['deleted'] ) && $deleted = absint( $_GET['deleted'] ) ) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31623';
|
||||
$wp_version = '4.2-alpha-31624';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user