Code Duplication    Length = 5-5 lines in 2 locations

classes/admin.php 2 locations

@@ 1485-1489 (lines=5) @@
1482
		$post_data = filter_input_array( INPUT_POST, FILTER_SANITIZE_STRING );
1483
		if ( $post_data['id'] ) {
1484
			$result = $this->mappings->delete_fieldmap( $post_data['id'] );
1485
			if ( true === $result ) {
1486
				$url = esc_url_raw( $post_data['redirect_url_success'] );
1487
			} else {
1488
				$url = esc_url_raw( $post_data['redirect_url_error'] . '&id=' . $post_data['id'] );
1489
			}
1490
			wp_safe_redirect( $url );
1491
			exit();
1492
		}
@@ 1551-1555 (lines=5) @@
1548
		$post_data = filter_input_array( INPUT_POST, FILTER_SANITIZE_STRING );
1549
		if ( isset( $post_data['id'] ) ) {
1550
			$result = $this->mappings->delete_object_map( $post_data['id'] );
1551
			if ( true === $result ) {
1552
				$url = esc_url_raw( $post_data['redirect_url_success'] );
1553
			} else {
1554
				$url = esc_url_raw( $post_data['redirect_url_error'] . '&id=' . $post_data['id'] );
1555
			}
1556
			wp_safe_redirect( $url );
1557
			exit();
1558
		} elseif ( $post_data['delete'] ) {