Skip to content

Commit

Permalink
Plugin: Update server blocks script to use core equivalent function (#…
Browse files Browse the repository at this point in the history
…14097)

`gutenberg_prepare_blocks_for_js` was deprecated in Gutenberg 5.0
  • Loading branch information
aduth committed Feb 26, 2019
1 parent 89573e8 commit e0adbe0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/get-server-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
require_once ABSPATH . WPINC . '/functions.php';
wp_load_translations_early();
wp_set_lang_dir();
require_once dirname( dirname( __FILE__ ) ) . '/lib/blocks.php';
require_once dirname( dirname( __FILE__ ) ) . '/lib/class-wp-block-type-registry.php';
require_once dirname( dirname( __FILE__ ) ) . '/lib/class-wp-block-type.php';
require_once dirname( dirname( __FILE__ ) ) . '/lib/client-assets.php';
require_once ABSPATH . WPINC . '/blocks.php';
require_once ABSPATH . WPINC . '/class-wp-block-type-registry.php';
require_once ABSPATH . WPINC . '/class-wp-block-type.php';
require_once ABSPATH . '/wp-admin/includes/post.php';

// Register server-side code for individual blocks.
foreach ( glob( dirname( dirname( __FILE__ ) ) . '/packages/block-library/src/*/index.php' ) as $block_logic ) {
Expand All @@ -36,4 +36,4 @@

do_action( 'init' );

echo json_encode( gutenberg_prepare_blocks_for_js() );
echo json_encode( get_block_editor_server_block_settings() );

0 comments on commit e0adbe0

Please sign in to comment.