Skip to content

Commit

Permalink
feat: Enable VideoPress v5 capability
Browse files Browse the repository at this point in the history
  • Loading branch information
Siobhan committed Feb 17, 2024
1 parent ffcb279 commit 0f5ba32
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2488,6 +2488,7 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
false,
false,
false,
false,
true,
false,
!isFreeWPCom,
Expand All @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -38,6 +39,7 @@ data class GutenbergPropsBuilder(
enableLayoutGridBlock = enableLayoutGridBlock,
enableTiledGalleryBlock = enableTiledGalleryBlock,
enableVideoPressBlock = enableVideoPressBlock,
enableVideoPressV5Support = enableVideoPressV5Support,
enableFacebookEmbed = enableFacebookEmbed,
enableInstagramEmbed = enableInstagramEmbed,
enableLoomEmbed = enableLoomEmbed,
Expand Down

0 comments on commit 0f5ba32

Please sign in to comment.