Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editor: Allow child theme PHP templates to take precedence over paren…
…t theme block templates. This change fixes template resolution to give precedence to child theme PHP templates over parent theme block templates with equal specificity. Before this change, when a theme was using a PHP template of a certain specificity (e.g. `page-home.php`), and it happened to be a child theme of another theme which had a block template for the same specificity (e.g. `page-home.html`), WordPress was picking the parent theme’s block template over the child theme’s PHP template to render the page. If the PHP and block template have equal specificity, the child theme's template should be used. The issue was fixed before in Gutenberg so the fix now needs to happen in Core. This change also re-enables the preexisting template resolution unit tests. Follow-up to [51003]. Props bernhard-reiter, youknowriad. Fixes #54515. Built from https://develop.svn.wordpress.org/trunk@52308 git-svn-id: http://core.svn.wordpress.org/trunk@51900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Loading branch information
Showing
2 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters