From 5959fb256fd3edb77d793c57ee0da9c30675be7a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 20 Sep 2024 14:09:18 +0000 Subject: [PATCH] Editor: Restore the merging of TinyMCE settings in `wp_tinymce_inline_scripts()`. This ensures that the function applies the `wp_editor_settings` filter and merges the resulting array with the rest of TinyMCE init settings. Includes a unit test to verify that the settings are merged correctly after adding the assignment of `array_merge()` result that was missed in the initial commit. Follow-up to [44265], [59033]. Props kkmuffme, akshat2802, davidbaumwald, SergeyBiryukov. Fixes #61754. Built from https://develop.svn.wordpress.org/trunk@59074 git-svn-id: http://core.svn.wordpress.org/trunk@58470 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/script-loader.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index a8540157b9..2da46f1332 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -609,6 +609,10 @@ function wp_tinymce_inline_scripts() { $tinymce_settings['wpeditimage_disable_captions'] = true; } + if ( ! empty( $editor_settings['tinymce'] ) && is_array( $editor_settings['tinymce'] ) ) { + $tinymce_settings = array_merge( $tinymce_settings, $editor_settings['tinymce'] ); + } + /** This filter is documented in wp-includes/class-wp-editor.php */ $tinymce_settings = apply_filters( 'tiny_mce_before_init', $tinymce_settings, 'classic-block' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 04d5e724f1..6ceac1f79f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-59073'; +$wp_version = '6.7-alpha-59074'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.