Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin: Update server blocks script to use core equivalent function #14097

Merged
merged 1 commit into from
Feb 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() );