-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix theme requirement validation with WP 5.8 #37226
Conversation
* | ||
* @return boolean Whether the current theme is a block theme or not. | ||
*/ | ||
function gutenberg_is_fse_theme() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move this in compat/wordpress-5.9/theme.php
.
Merging this should also fix failing performance checks. |
lib/compat/wordpress-5.9/theme.php
Outdated
|
||
/** | ||
* Note: We have to maintain this function for backward compatibility with WP 5.8. | ||
* Only remove once 5.9 is the minimum supported WordPress version for the Gutenberg plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could remove this line for 5.9
, as it's already suggested by structure we are trying to follow for compat changes per wp version.
I think your PR description (with a small rewording/changes) might be a better fit as a comment:
The validate_theme_requirements method is using gutenberg_is_fse_theme in older versions of WP.
Thanks, Nik. I've updated the commend and will merge this once all checks are green. |
@noisysocks, we might want to backport this to the core branch since original PR is also marked for backporting. |
So we backport this to wp/trunk but not core |
@youknowriad, right, backport only to |
* Fix theme requirement validation with WP 5.8 * Use compat file * Update comment
Description
Fixes regression when it wasn't possible to activate block theme with WP 5.8. The
validate_theme_requirements
method is usinggutenberg_is_fse_theme
in older versions of WP.Introduced in #37218.
How has this been tested?
Try activating block theme with WP 5.8
Screenshots
Types of changes
Bugfix/Regression
Checklist:
*.native.js
files for terms that need renaming or removal).