Code Duplication    Length = 6-6 lines in 2 locations

modules/carousel/jetpack-carousel.php 1 location

@@ 417-422 (lines=6) @@
414
		$attachment_desc  = wpautop( wptexturize( $attachment->post_content ) );
415
416
		// Not yet providing geo-data, need to "fuzzify" for privacy
417
		if ( ! empty( $img_meta ) ) {
418
			foreach ( $img_meta as $k => $v ) {
419
				if ( 'latitude' == $k || 'longitude' == $k )
420
					unset( $img_meta[$k] );
421
			}
422
		}
423
424
		// See https://github.com/Automattic/jetpack/issues/2765
425
		if ( isset( $img_meta['keywords'] ) ) {

modules/tiled-gallery/tiled-gallery/tiled-gallery-item.php 1 location

@@ 36-41 (lines=6) @@
33
	public function fuzzy_image_meta() {
34
		$meta = wp_get_attachment_metadata( $this->image->ID );
35
		$img_meta = ( ! empty( $meta['image_meta'] ) ) ? (array) $meta['image_meta'] : array();
36
		if ( ! empty( $img_meta ) ) {
37
			foreach ( $img_meta as $k => $v ) {
38
				if ( 'latitude' == $k || 'longitude' == $k )
39
					unset( $img_meta[$k] );
40
			}
41
		}
42
43
		return $img_meta;
44
	}