Code Duplication    Length = 11-11 lines in 2 locations

classes/PodsMeta.php 2 locations

@@ 1178-1188 (lines=11) @@
1175
1176
		pods_no_conflict_on( 'post' );
1177
1178
		if ( !empty( $pod ) ) {
1179
			// Fix for Pods doing it's own sanitization
1180
			$data = pods_unslash( (array) $data );
1181
1182
			$pod->save( $data, null, null, array( 'is_new_item' => $is_new_item ) );
1183
		}
1184
		elseif ( !empty( $id ) ) {
1185
			foreach ( $data as $field => $value ) {
1186
				update_post_meta( $id, $field, $value );
1187
			}
1188
		}
1189
1190
		pods_no_conflict_off( 'post' );
1191
@@ 1734-1744 (lines=11) @@
1731
1732
		pods_no_conflict_on( 'user' );
1733
1734
		if ( !empty( $pod ) ) {
1735
			// Fix for Pods doing it's own sanitization
1736
			$data = pods_unslash( (array) $data );
1737
1738
			$pod->save( $data, null, null, array( 'is_new_item' => $is_new_item ) );
1739
		}
1740
		elseif ( !empty( $id ) ) {
1741
			foreach ( $data as $field => $value ) {
1742
				update_user_meta( $id, $field, $value );
1743
			}
1744
		}
1745
1746
		pods_no_conflict_off( 'user' );
1747