Code Duplication    Length = 11-11 lines in 2 locations

classes/PodsMeta.php 2 locations

@@ 1215-1225 (lines=11) @@
1212
1213
		pods_no_conflict_on( 'post' );
1214
1215
		if ( !empty( $pod ) ) {
1216
			// Fix for Pods doing it's own sanitization
1217
			$data = pods_unslash( (array) $data );
1218
1219
			$pod->save( $data, null, null, array( 'is_new_item' => $is_new_item ) );
1220
		}
1221
		elseif ( !empty( $id ) ) {
1222
			foreach ( $data as $field => $value ) {
1223
				update_post_meta( $id, $field, $value );
1224
			}
1225
		}
1226
1227
		pods_no_conflict_off( 'post' );
1228
@@ 1771-1781 (lines=11) @@
1768
1769
		pods_no_conflict_on( 'user' );
1770
1771
		if ( !empty( $pod ) ) {
1772
			// Fix for Pods doing it's own sanitization
1773
			$data = pods_unslash( (array) $data );
1774
1775
			$pod->save( $data, null, null, array( 'is_new_item' => $is_new_item ) );
1776
		}
1777
		elseif ( !empty( $id ) ) {
1778
			foreach ( $data as $field => $value ) {
1779
				update_user_meta( $id, $field, $value );
1780
			}
1781
		}
1782
1783
		pods_no_conflict_off( 'user' );
1784