Skip to content

Commit

Permalink
Fix order of amp-editor-blocks inline scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed May 30, 2018
1 parent f1892eb commit f65439a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion includes/admin/class-amp-editor-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,15 @@ public function enqueue_block_editor_assets() {

wp_add_inline_script(
'amp-editor-blocks',
'wp.i18n.setLocaleData( ' . wp_json_encode( gutenberg_get_jed_locale_data( 'amp' ) ) . ', "amp" );' . sprintf( 'ampEditorBlocks.boot();' ),
'wp.i18n.setLocaleData( ' . wp_json_encode( gutenberg_get_jed_locale_data( 'amp' ) ) . ', "amp" );',
'before'
);

wp_add_inline_script(
'amp-editor-blocks',
'ampEditorBlocks.boot();',
'after'
);
}

/**
Expand Down

0 comments on commit f65439a

Please sign in to comment.