Code Duplication    Length = 13-14 lines in 2 locations

classes/class-wetu-importer.php 1 location

@@ 939-951 (lines=13) @@
936
				));
937
			}
938
939
			if ( false !== $temp_banner ) {
940
				$this->banner_image = $temp_banner;
941
942
				delete_post_meta( $id,'image_group' );
943
944
				$new_banner = array(
945
					'banner_image' => array(
946
						'cmb-field-0' => $this->banner_image,
947
					),
948
				);
949
950
				add_post_meta( $id,'image_group',$new_banner,true );
951
			}
952
		}
953
	}
954

classes/class-wetu-importer-tours.php 1 location

@@ 1265-1278 (lines=14) @@
1262
						'cropping' => 'c',
1263
					) );
1264
1265
					if ( false !== $temp_banner ) {
1266
						$this->banner_image = $temp_banner;
1267
1268
						delete_post_meta( $id,'image_group' );
1269
1270
						$new_banner = array(
1271
							'banner_image' => array(
1272
								'cmb-field-0' => $this->banner_image,
1273
							),
1274
						);
1275
						add_post_meta( $id,'image_group',$new_banner,true );
1276
						$image_set = true;
1277
					}
1278
				}
1279
				$counter++;
1280
			}
1281
		}