WordPress.org

Make WordPress Core

Changeset 44277


Ignore:
Timestamp:
12/17/2018 07:33:09 PM (19 months ago)
Author:
desrosj
Message:

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.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r44274 r44277  
    202202
    203203if ( 'wp_block' === $post_type ) {
     204    wp_enqueue_script( 'wp-list-reusable-blocks' );
    204205    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 );
    208206}
    209207
  • trunk/src/wp-includes/script-loader.php

    r44275 r44277  
    112112        $version = $vendor_scripts_versions[ $handle ];
    113113
    114         $scripts->add( $handle, $path, $dependencies, false, $version );
     114        $scripts->add( $handle, $path, $dependencies, $version, 1 );
    115115    }
    116116
     
    467467        $version = $packages_versions[ $package ];
    468468
    469         $scripts->add( $handle, $path, $dependencies, false, $version );
     469        $scripts->add( $handle, $path, $dependencies, $version, 1 );
    470470
    471471        if ( isset( $package_translations[ $package ] ) ) {
Note: See TracChangeset for help on using the changeset viewer.