Code Duplication    Length = 13-14 lines in 2 locations

classes/class-wetu-importer.php 1 location

@@ 923-935 (lines=13) @@
920
921
			}
922
923
			if ( false !== $temp_banner ) {
924
				$this->banner_image = $temp_banner;
925
926
				delete_post_meta( $id,'image_group' );
927
928
				$new_banner = array(
929
					'banner_image' => array(
930
						'cmb-field-0' => $this->banner_image,
931
					),
932
				);
933
934
				add_post_meta( $id,'image_group',$new_banner,true );
935
			}
936
		}
937
	}
938

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

@@ 1214-1227 (lines=14) @@
1211
						'cropping' => 'c',
1212
					) );
1213
1214
					if ( false !== $temp_banner ) {
1215
						$this->banner_image = $temp_banner;
1216
1217
						delete_post_meta( $id,'image_group' );
1218
1219
						$new_banner = array(
1220
							'banner_image' => array(
1221
								'cmb-field-0' => $this->banner_image,
1222
							),
1223
						);
1224
						add_post_meta( $id,'image_group',$new_banner,true );
1225
						$image_set = true;
1226
					}
1227
				}
1228
				$counter++;
1229
			}
1230
		}