Make WordPress Core

Opened 2 years ago

#55120 new defect (bug)

"wp_editor_settings" filter not working for the Classic block TinyMCE settings

Reported by: oztaser's profile oztaser Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords:
Focuses: Cc:


This filter was added in the #45348 to Classic Block but I think it's not working. To run this filter we need to use return value of array_merge reference. I double check if there is an any version of PHP could support this usage but I couldn't found:

You can find below my must use plugin for test, it doesn't effect any option of Classic block.

namespace NefisYemekTarifleri\Test_Classic_TinyMCE_Settings;

add_filter( 'wp_editor_settings', __NAMESPACE__ . '\\editor_settings', 10, 2 );
function editor_settings( $settings, $editor ) {
        if ( 'classic-block' !== $editor ) {
                return $settings;

        $settings['tinymce'] = [
                'toolbar1' => 'bold,italic'

        return $settings;

I hope I don't miss anything 🙂

Change History (0)

Note: See TracTickets for help on using tickets.