Code Duplication    Length = 4-4 lines in 5 locations

src/wp-admin/edit-comments.php 1 location

@@ 126-129 (lines=4) @@
123
124
	wp_safe_redirect( $redirect_to );
125
	exit;
126
} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
127
	 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
128
	 exit;
129
}
130
131
$wp_list_table->prepare_items();
132

src/wp-admin/edit.php 1 location

@@ 175-178 (lines=4) @@
172
173
	wp_redirect($sendback);
174
	exit();
175
} elseif ( ! empty($_REQUEST['_wp_http_referer']) ) {
176
	 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ) );
177
	 exit;
178
}
179
180
$wp_list_table->prepare_items();
181

src/wp-admin/link-manager.php 1 location

@@ 39-42 (lines=4) @@
36
	}
37
	wp_redirect( $redirect_to );
38
	exit;
39
} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
40
	 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
41
	 exit;
42
}
43
44
$wp_list_table->prepare_items();
45

src/wp-admin/upload.php 1 location

@@ 175-178 (lines=4) @@
172
173
	wp_redirect( $location );
174
	exit;
175
} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
176
	 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
177
	 exit;
178
}
179
180
$wp_list_table->prepare_items();
181

src/wp-admin/users.php 1 location

@@ 401-404 (lines=4) @@
398
399
default:
400
401
	if ( !empty($_GET['_wp_http_referer']) ) {
402
		wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce'), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
403
		exit;
404
	}
405
406
	if ( $wp_list_table->current_action() && ! empty( $_REQUEST['users'] ) ) {
407
		$userids = $_REQUEST['users'];