mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632. git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -19,12 +19,13 @@ wp_reset_vars( array( 'action' ) );
|
||||
if ( isset( $_GET['post'] ) && isset( $_POST['post_ID'] ) && (int) $_GET['post'] !== (int) $_POST['post_ID'] ) {
|
||||
wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
|
||||
} elseif ( isset( $_GET['post'] ) ) {
|
||||
$post_id = $post_ID = (int) $_GET['post'];
|
||||
$post_id = (int) $_GET['post'];
|
||||
} elseif ( isset( $_POST['post_ID'] ) ) {
|
||||
$post_id = $post_ID = (int) $_POST['post_ID'];
|
||||
$post_id = (int) $_POST['post_ID'];
|
||||
} else {
|
||||
$post_id = $post_ID = 0;
|
||||
$post_id = 0;
|
||||
}
|
||||
$post_ID = $post_id;
|
||||
|
||||
/**
|
||||
* @global string $post_type
|
||||
@@ -241,7 +242,8 @@ switch ( $action ) {
|
||||
wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
|
||||
}
|
||||
|
||||
if ( $user_id = wp_check_post_lock( $post_id ) ) {
|
||||
$user_id = wp_check_post_lock( $post_id );
|
||||
if ( $user_id ) {
|
||||
$user = get_userdata( $user_id );
|
||||
wp_die( sprintf( __( 'You cannot move this item to the Trash. %s is currently editing.' ), $user->display_name ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user