Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong analytics image source for Stock Photo in Gutenberg Editor #13940

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ extension GutenbergStockPhotos: StockPhotosPickerDelegate {
}

let mediaInfo = assets.compactMap({ (asset) -> MediaInfo? in
guard let media = self.mediaInserter.insert(exportableAsset: asset, source: .giphy) else {
guard let media = self.mediaInserter.insert(exportableAsset: asset, source: .stockPhotos) else {
return nil
}
let mediaUploadID = media.gutenbergUploadID
@@ -75,7 +75,7 @@ extension GutenbergStockPhotos: StockPhotosPickerDelegate {
/// - Parameter assets: Stock Media objects to append.
func appendOnNewBlocks(assets: ArraySlice<StockPhotosMedia>) {
assets.forEach {
if let media = self.mediaInserter.insert(exportableAsset: $0, source: .giphy) {
if let media = self.mediaInserter.insert(exportableAsset: $0, source: .stockPhotos) {
self.gutenberg.appendMedia(id: media.gutenbergUploadID, url: $0.URL, type: .image)
}
}