From db6ae8a9be1e89e04167dc429e8e211b68e19096 Mon Sep 17 00:00:00 2001 From: youknowriad Date: Thu, 22 Nov 2018 07:25:45 +0000 Subject: [PATCH] Block Editor: Fix loading the script handling the "Manage Reusable Blocks" page. This ensures the "import from JSON" and "export JSON" buttons are shown properly. The script is loaded in the footer because it relies on the DOM being already there. Props noisysocks, mukesh27. Fixes #45396. Built from https://develop.svn.wordpress.org/branches/5.0@43936 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43768 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/edit.php b/wp-admin/edit.php index be61db1502..d85a1ea49c 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -183,8 +183,10 @@ wp_enqueue_script('inline-edit-post'); wp_enqueue_script('heartbeat'); if ( 'wp_block' === $post_type ) { - wp_enqueue_script( 'wp-list-reusable-blocks' ); wp_enqueue_style( 'wp-list-reusable-blocks' ); + + // wp-list-reusable-blocks enhances the page's DOM and so needs to be loaded in the footer. + wp_enqueue_script( 'wp-list-reusable-blocks', '', array(), false, true ); } $title = $post_type_object->labels->name; diff --git a/wp-includes/version.php b/wp-includes/version.php index 1c0afaa8a5..6df0fc5e3b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-beta5-43935'; +$wp_version = '5.0-beta5-43936'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.