Block Editor: Fix the WordPress packages and vendor script registration.

The version is set properly and the scripts are automatically loaded in the footer.

This patch also includes a revert for the reusable blocks enqueue script.

Props pento, swissspidy, youknowriad.

Merges [43942] into trunk.

Fixes #45402.
See #45396.

git-svn-id: https://develop.svn.wordpress.org/trunk@44277 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers
2018-12-17 19:33:09 +00:00
parent 4c636c6ec8
commit 15fa394a01
2 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -201,10 +201,8 @@ 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;