WordPress.org

Make WordPress Core

Changeset 43936


Ignore:
Timestamp:
11/22/2018 07:24:01 AM (10 months ago)
Author:
youknowriad
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/edit.php

    r43849 r43936  
    184184
    185185if ( 'wp_block' === $post_type ) {
    186     wp_enqueue_script( 'wp-list-reusable-blocks' );
    187186    wp_enqueue_style( 'wp-list-reusable-blocks' );
     187
     188    // wp-list-reusable-blocks enhances the page's DOM and so needs to be loaded in the footer.
     189    wp_enqueue_script( 'wp-list-reusable-blocks', '', array(), false, true );
    188190}
    189191
Note: See TracChangeset for help on using the changeset viewer.