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:
Gary Pendergast
2019-07-01 12:50:14 +00:00
parent 5fe76184f2
commit 9a1549767e
74 changed files with 634 additions and 337 deletions
+6 -4
View File
@@ -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 ) );
}