-
Notifications
You must be signed in to change notification settings - Fork 91
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
improved image sizes
for left/right/center alignment
#1290
improved image sizes
for left/right/center alignment
#1290
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
This is currently blocked until #1251 is resolved, then will need to be updated based on the approach taken to fix that issue.
@joemcgill The commit 7cbb7ae addresses center alignment. |
@@ -159,7 +159,7 @@ function auto_sizes_improve_image_sizes_attributes( string $content ): string { | |||
} | |||
|
|||
// Skips second time parsing if already processed. | |||
if ( false === $processor->get_attribute( 'data-needs-sizes-update' ) ) { | |||
if ( null === $processor->get_attribute( 'data-needs-sizes-update' ) ) { |
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.
Per WP_HTML_Tag_Processor::get_attribute documentation, It return null instead of false
when element is not presented.
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, good catch.
@joemcgill @westonruter The PR is ready for review. Joe, In 892b0dc, I used |
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.
LGTM, but with the tear_down
not being necessary
a305629
into
feature/more-accurate-sizes-attribute
Summary
Fixes #1289