Code Duplication    Length = 4-4 lines in 2 locations

json-endpoints/class.wpcom-json-api-update-media-v1-1-endpoint.php 1 location

@@ 96-99 (lines=4) @@
93
			$insert['post_parent'] = $input['parent_id'];
94
		}
95
96
		if ( isset( $input['alt'] ) ) {
97
			$alt = wp_strip_all_tags( $input['alt'], true );
98
			update_post_meta( $media_id, '_wp_attachment_image_alt', $alt );
99
		}
100
101
		// audio only artist/album info
102
		if ( 0 === strpos( $item->mime_type, 'audio/' ) ) {

class.json-api-endpoints.php 1 location

@@ 1888-1891 (lines=4) @@
1885
1886
				// Attributes: Alt
1887
1888
				if ( isset( $attrs['alt'] ) ) {
1889
					$alt = wp_strip_all_tags( $attrs['alt'], true );
1890
					update_post_meta( $media_id, '_wp_attachment_image_alt', $alt );
1891
				}
1892
1893
				// Attributes: Artist, Album
1894