Skip to content

Commit

Permalink
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -2488,6 +2488,7 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
false,
false,
false,
false,
true,
false,
!isFreeWPCom,
@@ -2506,6 +2507,7 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
SiteUtils.supportsLayoutGridFeature(mSite),
SiteUtils.supportsTiledGalleryFeature(mSite),
SiteUtils.supportsVideoPressFeature(mSite),
SiteUtils.supportsVideoPressV5Feature(mSite),
SiteUtils.supportsEmbedVariationFeature(mSite, SiteUtils.WP_FACEBOOK_EMBED_JETPACK_VERSION),
SiteUtils.supportsEmbedVariationFeature(mSite, SiteUtils.WP_INSTAGRAM_EMBED_JETPACK_VERSION),
SiteUtils.supportsEmbedVariationFeature(mSite, SiteUtils.WP_LOOM_EMBED_JETPACK_VERSION),
Original file line number Diff line number Diff line change
@@ -340,6 +340,10 @@ public static boolean supportsVideoPressFeature(SiteModel site) {
return site != null && site.isWPCom();
}

public static boolean supportsVideoPressV5Feature(SiteModel site) {
return site != null && site.isWPCom() || site.isWPComAtomic();
}

public static boolean supportsEmbedVariationFeature(SiteModel site, String minimalJetpackVersion) {
return site != null && (site.isWPCom() || checkMinimalJetpackVersion(site, minimalJetpackVersion));
}
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ data class GutenbergPropsBuilder(
private val enableLayoutGridBlock: Boolean,
private val enableTiledGalleryBlock: Boolean,
private val enableVideoPressBlock: Boolean,
private val enableVideoPressV5Support: Boolean,
private val enableFacebookEmbed: Boolean,
private val enableInstagramEmbed: Boolean,
private val enableLoomEmbed: Boolean,
@@ -38,6 +39,7 @@ data class GutenbergPropsBuilder(
enableLayoutGridBlock = enableLayoutGridBlock,
enableTiledGalleryBlock = enableTiledGalleryBlock,
enableVideoPressBlock = enableVideoPressBlock,
enableVideoPressV5Support = enableVideoPressV5Support,
enableFacebookEmbed = enableFacebookEmbed,
enableInstagramEmbed = enableInstagramEmbed,
enableLoomEmbed = enableLoomEmbed,

0 comments on commit 0f5ba32

Please sign in to comment.