Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSE: Fix template resolution to give precedence to child theme PHP templates over parent theme block templates with equal specificity #37074

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Dec 2, 2021

Description

Back-backport of WordPress/wordpress-develop#1985. See there for more background and details.

Merge only once WordPress/wordpress-develop#1985 has been approved and committed!

How has this been tested?

Ideally, have a parent theme with a block template of a certain specificity (e.g. page-home.html), and a child theme with a PHP template for the same specificity (e.g. page-home.php). Then, verify that Gutenberg gives precedence to the PHP theme (e.g. when rendering a page that matches that specificity).

Types of changes

Bug fix.

@youknowriad youknowriad added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Dec 3, 2021
@youknowriad
Copy link
Contributor

This is already in Core but I'm adding the backport to label to sync wp/trunk branch.

@ockham ockham marked this pull request as ready for review December 3, 2021 11:00
…mplates over parent theme block templates with equal specificity
@noisysocks noisysocks force-pushed the backbackport/child-theme-php-template-precedence-over-parent-theme-block-template branch from 23f3cc3 to 71bc8d0 Compare December 6, 2021 01:18
@noisysocks
Copy link
Member

I rebased this to (hopefully) fix failing tests.

@ockham ockham merged commit 0914cec into trunk Dec 6, 2021
@ockham ockham deleted the backbackport/child-theme-php-template-precedence-over-parent-theme-block-template branch December 6, 2021 12:07
@github-actions github-actions bot added this to the Gutenberg 12.2 milestone Dec 6, 2021
@noisysocks noisysocks removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Dec 13, 2021
noisysocks pushed a commit that referenced this pull request Dec 13, 2021
…mplates over parent theme block templates with equal specificity (#37074)

Back-backport of WordPress/wordpress-develop#1985. See there for more background and details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants