Make WordPress Core

Changeset 44274


Ignore:
Timestamp:
12/17/2018 07:07:35 PM (6 years ago)
Author:
desrosj
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.

Merges [43936] into trunk.

Fixes #45396.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/edit.php

    r44215 r44274  
    202202
    203203if ( 'wp_block' === $post_type ) {
    204     wp_enqueue_script( 'wp-list-reusable-blocks' );
    205204    wp_enqueue_style( 'wp-list-reusable-blocks' );
     205
     206    // wp-list-reusable-blocks enhances the page's DOM and so needs to be loaded in the footer.
     207    wp_enqueue_script( 'wp-list-reusable-blocks', '', array(), false, true );
    206208}
    207209
Note: See TracChangeset for help on using the changeset viewer.