Make WordPress Core

Changeset 59074


Ignore:
Timestamp:
09/20/2024 02:07:11 PM (6 months ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r59051 r59074  
    608608    if ( $disable_captions ) {
    609609        $tinymce_settings['wpeditimage_disable_captions'] = true;
     610    }
     611
     612    if ( ! empty( $editor_settings['tinymce'] ) && is_array( $editor_settings['tinymce'] ) ) {
     613        $tinymce_settings = array_merge( $tinymce_settings, $editor_settings['tinymce'] );
    610614    }
    611615
Note: See TracChangeset for help on using the changeset viewer.