Code Duplication    Length = 6-6 lines in 2 locations

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
	}

modules/carousel/jetpack-carousel.php 1 location

@@ 432-437 (lines=6) @@
429
		$attachment_title = wptexturize( $attachment->post_title );
430
		$attachment_desc  = wpautop( wptexturize( $attachment->post_content ) );
431
		// Not yet providing geo-data, need to "fuzzify" for privacy
432
		if ( ! empty( $img_meta ) ) {
433
			foreach ( $img_meta as $k => $v ) {
434
				if ( 'latitude' == $k || 'longitude' == $k )
435
					unset( $img_meta[$k] );
436
			}
437
		}
438
439
		// See https://github.com/Automattic/jetpack/issues/2765
440
		if ( isset( $img_meta['keywords'] ) ) {