Code Duplication    Length = 11-11 lines in 2 locations

classes/PodsMeta.php 2 locations

@@ 1172-1182 (lines=11) @@
1169
1170
		pods_no_conflict_on( 'post' );
1171
1172
		if ( !empty( $pod ) ) {
1173
			// Fix for Pods doing it's own sanitization
1174
			$data = pods_unslash( (array) $data );
1175
1176
			$pod->save( $data, null, null, array( 'is_new_item' => $is_new_item ) );
1177
		}
1178
		elseif ( !empty( $id ) ) {
1179
			foreach ( $data as $field => $value ) {
1180
				update_post_meta( $id, $field, $value );
1181
			}
1182
		}
1183
1184
		pods_no_conflict_off( 'post' );
1185
@@ 1728-1738 (lines=11) @@
1725
1726
		pods_no_conflict_on( 'user' );
1727
1728
		if ( !empty( $pod ) ) {
1729
			// Fix for Pods doing it's own sanitization
1730
			$data = pods_unslash( (array) $data );
1731
1732
			$pod->save( $data, null, null, array( 'is_new_item' => $is_new_item ) );
1733
		}
1734
		elseif ( !empty( $id ) ) {
1735
			foreach ( $data as $field => $value ) {
1736
				update_user_meta( $id, $field, $value );
1737
			}
1738
		}
1739
1740
		pods_no_conflict_off( 'user' );
1741