Make WordPress Core

Opened 3 days ago

Last modified 2 days ago

#64778 new defect (bug)

get_block_editor_theme_styles() doesn't load editor styles of parent theme

Reported by: ocean90's profile ocean90 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.8
Component: Themes Keywords: has-patch needs-unit-tests
Focuses: template Cc:

Description

If a parent block theme uses add_editor_style( 'style-editor.css' ); and the child theme too, the style-editor.css of the parent theme is no longer loaded. This is unexpected and different from classic themes.

get_editor_stylesheets() looks in the parent theme as well while get_block_editor_theme_styles() uses get_theme_file_path() which searches in the stylesheet directory before the template directory.

The current workaround is to use a different file name in the child theme.

Change History (2)

This ticket was mentioned in PR #11112 on WordPress/wordpress-develop by @ocean90.


3 days ago
#1

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/64778

## Use of AI Tools

None.

#2 @westonruter
2 days ago

  • Keywords needs-unit-tests added
Note: See TracTickets for help on using tickets.