diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 69a3988b0e9e..359513d8fb50 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,5 +1,6 @@ 22.6 ----- +* [**] [internal] Check required WordPress version to set "galleryWithImageBlocks" flag [#20736] 22.5 diff --git a/WordPress/Classes/Models/BlockEditorSettings+GutenbergEditorSettings.swift b/WordPress/Classes/Models/BlockEditorSettings+GutenbergEditorSettings.swift index 0b46c3ffdba7..511191b76672 100644 --- a/WordPress/Classes/Models/BlockEditorSettings+GutenbergEditorSettings.swift +++ b/WordPress/Classes/Models/BlockEditorSettings+GutenbergEditorSettings.swift @@ -12,7 +12,14 @@ extension BlockEditorSettings: GutenbergEditorSettings { } public var galleryWithImageBlocks: Bool { - return experimentalFeature(.galleryWithImageBlocks) + // If site is using WP 5.9+ then return true as galleryWithImageBlocks is supported in WP 5.9+. + // Once support for WP 5.8 is dropped, this can be removed. + // https://github.com/WordPress/gutenberg/issues/47782 + if blog.hasRequiredWordPressVersion("5.9") { + return true + } else { + return experimentalFeature(.galleryWithImageBlocks) + } } public var quoteBlockV2: Bool {