Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#18457 closed defect (bug) (fixed)

Parent Theme Editor styles should be included before Child Theme styles

Reported by: dd32 Owned by: dd32
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.2
Component: Editor Keywords: dev-feedback has-patch
Focuses: Cc:


Related: #14430 (and originally reported by somatic in #14430#comment:11 )

#14430 fixed the order of inclusion for css styles of the same name so that child theme styles could override the parents.

However, That only applied to stylesheers of the same name.


child theme:
add_action( 'after_setup_theme', function() {
add_editor_style( 'child-style.css');
} );

parent theme:
add_action( 'after_setup_theme', function() {
add_editor_style( 'editor-style.css');
} );

Since they're not the same name, they'll be included in the order they were defined:


Instead of looping over $editor_styles and adding the files as they're found, Perhaps the files should be sought after in the parent theme, and then a 2nd loop be run to find them all in the child themes folder.

Attachments (1)

18457.patch (701 bytes) - added by SergeyBiryukov 4 years ago.

Download all attachments as: .zip

Change History (4)

@SergeyBiryukov4 years ago

comment:1 @SergeyBiryukov4 years ago

  • Keywords has-patch added

comment:2 @dd324 years ago

  • Milestone changed from Awaiting Review to 3.3

comment:3 @dd324 years ago

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

In [18572]:

Load all Parent theme stylesheets before Child theme stylesheets in the TinyMCE Editor. props SergeyBiryukov. Fixes #18457

Note: See TracTickets for help on using tickets.