Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Always enable gallery v2 on web
  • Loading branch information
youknowriad committed Dec 7, 2022
commit ac0493495c12810cb56f9b03136407c0d478ba70
9 changes: 0 additions & 9 deletions packages/block-library/src/gallery/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,9 @@ function getGalleryBlockV2Enabled() {
* can be removed when minimum supported WP version >=5.9.
*/
export function isGalleryV2Enabled() {
// The logic for the native version is located in a different if statement
// due to a lint rule that prohibits a single conditional combining
// `process.env.IS_GUTENBERG_PLUGIN` with a native platform check.
if ( Platform.isNative ) {
return getGalleryBlockV2Enabled();
}

// Only run the Gallery version compat check if the plugin is running, otherwise
// assume we are in 5.9 core and enable by default.
if ( process.env.IS_GUTENBERG_PLUGIN ) {
return getGalleryBlockV2Enabled();
}

return true;
}