WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 5 months ago

#45348 closed defect (bug) (fixed)

Run the "wp_editor_settings" filter for the Classic block TinyMCE settings

Reported by: azaozz Owned by: azaozz
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords: has-patch commit fixed-5.0
Focuses: Cc:

Description

It is meant to filter (unrelated) wp_editor() settings but accepts an array for tinymce that adds to/overrides the default TinyMCE settings. Also some plugins may be using it to add other editor filters like mce_external_plugins, mce_buttons, etc. A quick GH search shows 47k hits for this filter (most are duplicated code, but still...).

Attachments (2)

45348.diff (2.4 KB) - added by azaozz 6 months ago.
45348.2.diff (1.8 KB) - added by azaozz 6 months ago.

Download all attachments as: .zip

Change History (9)

#1 @azaozz
6 months ago

Another filter that we should keep is disable_captions. It just passes a setting from PHP to JS to change how image captions are handled. That seems to be used quite a bit too according to a quick GH search.

@azaozz
6 months ago

#2 @azaozz
6 months ago

  • Keywords has-patch added

In 45348.diff:

  • Add the wp_editor_settings and disable_captions filters at the appropriate places.
  • Add some docs explaining that the settings are used to extend and override the default TinyMCE settings.

Note that this diff also includes Gary's 45338.diff from #45338.

@azaozz
6 months ago

#3 @azaozz
6 months ago

  • Keywords commit added

In 45348.2.diff: refresh the diff after [43901].

#4 @pento
6 months ago

45348.2.diff is good to go.

#5 @azaozz
6 months ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 43914:

TinyMCE: Run the "wp_editor_settings" and "disable_captions" filters for the Classic block. Fixes possible regressions in plugins that use these filters, also plugins that use them to add filters for the buttons, external plugins, etc.

Fixes #45348.

#6 @SergeyBiryukov
6 months ago

  • Keywords fixed-5.0 added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for trunk.

#7 @desrosj
5 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 44265:

TinyMCE: Run the filters for the Classic block.

The wp_editor_settings and disable_captions filters need to be run for the Classic Block.

This fixes possible regressions in plugins that use these filters, and plugins that use them to add filters for the buttons, external plugins, etc.

Props azaozz.

Merges [43914] into trunk.

Fixes #45348.

Note: See TracTickets for help on using tickets.