Skip to content

Commit

Permalink
Issue #3 - Check if the new Editor is active
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Feb 20, 2018
1 parent 63359a5 commit d31e2c3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions shortcodes/oik-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ function oik_block_registered_blocks() {


//WP_Block_Registry::get_all_registered
oik_require( "lib/client-assets.php", "gutenberg" );
$blocks = gutenberg_prepare_blocks_for_js();
bw_trace2( $blocks, "blocks", false );
if ( function_exists( "gutenberg_prepare_blocks_for_js" ) ) {
oik_require( "lib/client-assets.php", "gutenberg" );
$blocks = gutenberg_prepare_blocks_for_js();
bw_trace2( $blocks, "blocks", false );
}
}

/*
Expand Down

0 comments on commit d31e2c3

Please sign in to comment.