diff --git a/lib/compat/wordpress-6.3/footnotes.php b/lib/compat/wordpress-6.3/footnotes.php new file mode 100644 index 00000000000000..45f4c74b05e37b --- /dev/null +++ b/lib/compat/wordpress-6.3/footnotes.php @@ -0,0 +1,25 @@ +\s*\d+\s*_'; + return preg_replace( $footnote_pattern, '', $content ); +} + +add_filter( 'the_content', 'gutenberg_trim_footnotes' ); diff --git a/lib/load.php b/lib/load.php index 340a9001304051..ea9aabd5427184 100644 --- a/lib/load.php +++ b/lib/load.php @@ -57,6 +57,7 @@ function gutenberg_is_experiment_enabled( $name ) { require_once __DIR__ . '/compat/wordpress-6.3/link-template.php'; require_once __DIR__ . '/compat/wordpress-6.3/block-patterns.php'; require_once __DIR__ . '/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php'; + require_once __DIR__ . '/compat/wordpress-6.3/footnotes.php'; // Experimental. if ( ! class_exists( 'WP_Rest_Customizer_Nonces' ) ) {