Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 53-59 (lines=7) @@
50
			}
51
		}
52
53
		if ( ! empty( $id3_meta ) ) {
54
			// Before updating metadata, ensure that the item is audio
55
			$item = $this->get_media_item_v1_1( $media_id );
56
			if ( 0 === strpos( $item->mime_type, 'audio/' ) ) {
57
				wp_update_attachment_metadata( $media_id, $id3_meta );
58
			}
59
		}
60
61
		return $update_action;
62
	}

class.json-api-endpoints.php 1 location

@@ 1765-1771 (lines=7) @@
1762
					}
1763
				}
1764
1765
				if ( ! empty( $id3_meta ) ) {
1766
					// Before updating metadata, ensure that the item is audio
1767
					$item = $this->get_media_item_v1_1( $media_id );
1768
					if ( 0 === strpos( $item->mime_type, 'audio/' ) ) {
1769
						wp_update_attachment_metadata( $media_id, $id3_meta );
1770
					}
1771
				}
1772
			}
1773
		}
1774