Code Duplication    Length = 5-5 lines in 2 locations

classes/admin.php 2 locations

@@ 1461-1465 (lines=5) @@
1458
		$post_data = filter_input_array( INPUT_POST, FILTER_SANITIZE_STRING );
1459
		if ( $post_data['id'] ) {
1460
			$result = $this->mappings->delete_fieldmap( $post_data['id'] );
1461
			if ( true === $result ) {
1462
				$url = esc_url_raw( $post_data['redirect_url_success'] );
1463
			} else {
1464
				$url = esc_url_raw( $post_data['redirect_url_error'] . '&id=' . $post_data['id'] );
1465
			}
1466
			wp_safe_redirect( $url );
1467
			exit();
1468
		}
@@ 1527-1531 (lines=5) @@
1524
		$post_data = filter_input_array( INPUT_POST, FILTER_SANITIZE_STRING );
1525
		if ( isset( $post_data['id'] ) ) {
1526
			$result = $this->mappings->delete_object_map( $post_data['id'] );
1527
			if ( true === $result ) {
1528
				$url = esc_url_raw( $post_data['redirect_url_success'] );
1529
			} else {
1530
				$url = esc_url_raw( $post_data['redirect_url_error'] . '&id=' . $post_data['id'] );
1531
			}
1532
			wp_safe_redirect( $url );
1533
			exit();
1534
		} elseif ( $post_data['delete'] ) {