Skip to content

Commit

Permalink
Merge pull request #20736 from wordpress-mobile/gutenberg/galleryWith…
Browse files Browse the repository at this point in the history
…ImageBlocks-check-WP-version

Check required WordPress version to set galleryWithImageBlocks flag
  • Loading branch information
derekblank authored May 30, 2023
2 parents c7bf2d3 + a9b862c commit 91011f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
22.6
-----
* [**] [internal] Check required WordPress version to set "galleryWithImageBlocks" flag [#20736]


22.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 91011f7

Please sign in to comment.