diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index c1c37487ef..3e4fd40e7f 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -125,7 +125,11 @@ $meta_box_url = add_query_arg( ), $meta_box_url ); -wp_localize_script( 'wp-editor', '_wpMetaBoxUrl', $meta_box_url ); +wp_add_inline_script( + 'wp-editor', + sprintf( 'var _wpMetaBoxUrl = %s;', wp_json_encode( $meta_box_url ) ), + 'before' +); /*