Code Duplication    Length = 6-6 lines in 2 locations

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

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

modules/carousel/jetpack-carousel.php 1 location

@@ 300-305 (lines=6) @@
297
		$attachment_desc  = wpautop( wptexturize( $attachment->post_content ) );
298
299
		// Not yet providing geo-data, need to "fuzzify" for privacy
300
		if ( ! empty( $img_meta ) ) {
301
			foreach ( $img_meta as $k => $v ) {
302
				if ( 'latitude' == $k || 'longitude' == $k )
303
					unset( $img_meta[$k] );
304
			}
305
		}
306
307
		// See https://github.com/Automattic/jetpack/issues/2765
308
		if ( isset( $img_meta['keywords'] ) ) {