Skip to content

Commit 7d294c2

Browse files
committed
Fix MathML
1 parent f734da1 commit 7d294c2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/wp-includes/default-filters.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@
620620
add_action( 'enqueue_block_editor_assets', 'enqueue_editor_block_styles_assets' );
621621
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' );
622622
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_format_library_assets' );
623+
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_block_editor_script_modules' );
623624
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_global_styles_css_custom_properties' );
624625
add_action( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
625626
add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );

src/wp-includes/script-modules.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,16 @@ function wp_default_script_modules() {
193193
wp_register_script_module( $script_module_id, $path, $script_module_data['dependencies'], $script_module_data['version'], $args );
194194
}
195195
}
196+
197+
/**
198+
* Enqueues script modules required by the block editor.
199+
*
200+
* @since 6.9.0
201+
*/
202+
function wp_enqueue_block_editor_script_modules() {
203+
/*
204+
* Enqueue the LaTeX to MathML loader for the math block editor.
205+
* The loader dynamically imports the main LaTeX to MathML module when needed.
206+
*/
207+
wp_enqueue_script_module( '@wordpress/latex-to-mathml/loader' );
208+
}

0 commit comments

Comments
 (0)