Skip to content

Commit

Permalink
Blocks: allow enabling Experimental blocks via a filter (#14908)
Browse files Browse the repository at this point in the history
Follow-up from #14104.

In some environments (like on WordPress.com), it may be easier to use a filter to change the way we load blocks.
  • Loading branch information
jeherve authored Mar 6, 2020
1 parent 240f1b5 commit 557a85a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions class.jetpack-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,17 @@ public static function init() {
Constants::set_constant( 'JETPACK_BETA_BLOCKS', true );
}

/**
* Alternative to `JETPACK_EXPERIMENTAL_BLOCKS`, set to `true` to load Experimental Blocks.
*
* @since 8.4.0
*
* @param boolean
*/
if ( apply_filters( 'jetpack_load_experimental_blocks', false ) ) {
Constants::set_constant( 'JETPACK_EXPERIMENTAL_BLOCKS', true );
}

/**
* Filter the whitelist of block editor extensions that are available through Jetpack.
*
Expand Down

0 comments on commit 557a85a

Please sign in to comment.