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

@@ 1736-1742 (lines=7) @@
1733
					}
1734
				}
1735
1736
				if ( ! empty( $id3_meta ) ) {
1737
					// Before updating metadata, ensure that the item is audio
1738
					$item = $this->get_media_item_v1_1( $media_id );
1739
					if ( 0 === strpos( $item->mime_type, 'audio/' ) ) {
1740
						wp_update_attachment_metadata( $media_id, $id3_meta );
1741
					}
1742
				}
1743
			}
1744
		}
1745