Code Duplication    Length = 5-5 lines in 2 locations

sal/class.json-api-post-base.php 1 location

@@ 615-619 (lines=5) @@
612
			}
613
		}
614
615
		if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
616
			$metadata = wp_get_attachment_metadata( $media_item->ID );
617
			$response['length'] = $metadata['length'];
618
			$response['exif']   = $metadata;
619
		}
620
621
		if ( in_array( $ext, array( 'ogv', 'mp4', 'mov', 'wmv', 'avi', 'mpg', '3gp', '3g2', 'm4v' ) ) ) {
622
			$metadata = wp_get_attachment_metadata( $media_item->ID );

class.json-api-endpoints.php 1 location

@@ 1273-1277 (lines=5) @@
1270
			}
1271
		}
1272
1273
		if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
1274
			$metadata = wp_get_attachment_metadata( $media_item->ID );
1275
			$response['length'] = $metadata['length'];
1276
			$response['exif']   = $metadata;
1277
		}
1278
1279
		$is_video = false;
1280