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:
parent
7ade352f0f
commit
db6ae8a9be
|
@ -183,8 +183,10 @@ wp_enqueue_script('inline-edit-post');
|
||||||
wp_enqueue_script('heartbeat');
|
wp_enqueue_script('heartbeat');
|
||||||
|
|
||||||
if ( 'wp_block' === $post_type ) {
|
if ( 'wp_block' === $post_type ) {
|
||||||
wp_enqueue_script( 'wp-list-reusable-blocks' );
|
|
||||||
wp_enqueue_style( '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;
|
$title = $post_type_object->labels->name;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue