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
This commit is contained in:
youknowriad 2018-11-22 07:25:45 +00:00
parent 7ade352f0f
commit db6ae8a9be
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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.