-
Notifications
You must be signed in to change notification settings - Fork 384
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
Update legacy theme styles to add responsiveness to featured image #7560
Conversation
Plugin builds for 892fa93 are ready 🛎️!
|
Co-authored-by: Weston Ruter <westonruter@google.com>
f912cba
to
d62b5c2
Compare
2321c08
to
14e58fb
Compare
tests/php/bootstrap.php
Outdated
@@ -5,6 +5,7 @@ | |||
|
|||
use Yoast\WPTestUtils\WPIntegration; | |||
|
|||
define( 'WP_DEVELOPMENT_MODE', '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.
Shouldn't this be plugin
?
define( 'WP_DEVELOPMENT_MODE', 'theme' ); | |
define( 'WP_DEVELOPMENT_MODE', '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.
Yes, it should be. I am just testing a few scenarios with 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.
@westonruter wp_theme_has_theme_json()
now depends on wp_get_development_mode()
which is theme
and WP_RUN_CORE_TESTS
constant but setting up WP_RUN_CORE_TESTS
is breaking our multiple test cases so I think for now we have to keep WP_DEVELOPMENT_MODE
as 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.
Is the problem that wp_theme_has_theme_json()
is sending back stale results? Does this reflect a problem with caching?
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.
Yes. In these tests, we are changing the theme to TT3
to test reader theme features from theme.json
. After changing the theme wp_theme_has_theme_json()
returns false as the previous theme was not a theme with theme.json
which is a cached result AFAIK.
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.
I think this then reflects a bug in wp_theme_has_theme_json
. In particular, it is not varying the cache by the theme. There needs to be another static variable in wp_theme_has_theme_json
which captures the theme that was checked, or else to let $theme_has_support
be a mapping of theme slug to boolean.
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.
Yeah makes sense. It should have some logic to revalidate the cache in case the theme is being changed.
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.
Core patch created: WordPress/wordpress-develop#4816
Co-authored-by: Weston Ruter <westonruter@google.com>
This reverts commit 403af64.
…has theme.json file
c7ef24f
to
be8c3fb
Compare
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.
Great work!
Summary
Fixes #7550
Checklist