WordPress.org

Making WordPress.org

Changeset 7892


Ignore:
Timestamp:
11/23/2018 12:14:18 PM (11 months ago)
Author:
nbachiyski
Message:

Gutenberg: add wp-blocks and wp-element deps

The download button script was loaded before Gutenberg and wp.element was not defined.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php

    r7862 r7892  
    170170
    171171    add_action( 'enqueue_block_editor_assets', function() {
    172         wp_enqueue_script( 'button-readonly', get_template_directory_uri() . '/js/button-readonly.js', array(), null );
     172        wp_enqueue_script( 'button-readonly', get_template_directory_uri() . '/js/button-readonly.js', array( 'wp-blocks', 'wp-element' ), null );
    173173    } );
    174174
Note: See TracChangeset for help on using the changeset viewer.