Code Duplication    Length = 11-11 lines in 2 locations

classes/PodsMeta.php 2 locations

@@ 1232-1242 (lines=11) @@
1229
1230
		pods_no_conflict_on( 'post' );
1231
1232
		if ( !empty( $pod ) ) {
1233
			// Fix for Pods doing it's own sanitization
1234
			$data = pods_unslash( (array) $data );
1235
1236
			$pod->save( $data, null, null, array( 'is_new_item' => $is_new_item ) );
1237
		}
1238
		elseif ( !empty( $id ) ) {
1239
			foreach ( $data as $field => $value ) {
1240
				update_post_meta( $id, $field, $value );
1241
			}
1242
		}
1243
1244
		pods_no_conflict_off( 'post' );
1245
@@ 1846-1856 (lines=11) @@
1843
1844
		pods_no_conflict_on( 'user' );
1845
1846
		if ( !empty( $pod ) ) {
1847
			// Fix for Pods doing it's own sanitization
1848
			$data = pods_unslash( (array) $data );
1849
1850
			$pod->save( $data, null, null, array( 'is_new_item' => $is_new_item ) );
1851
		}
1852
		elseif ( !empty( $id ) ) {
1853
			foreach ( $data as $field => $value ) {
1854
				update_user_meta( $id, $field, $value );
1855
			}
1856
		}
1857
1858
		pods_no_conflict_off( 'user' );
1859