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

Add generator meta tag for Embed Optimizer #1057

Merged
merged 3 commits into from Mar 15, 2024

Conversation

westonruter
Copy link
Member

This matches the meta[name=generator] added by WebP Uploads and Dominant Color Images.

@westonruter westonruter added [Type] Enhancement A suggestion for improvement of an existing feature [Focus] JS & CSS Issues related to the JS & CSS focus area (formerly JavaScript) no milestone PRs that do not have a defined milestone for release [Plugin] Embed Optimizer Issues for the Embed Optimizer plugin labels Mar 15, 2024
Copy link

github-actions bot commented Mar 15, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <westonruter@git.wordpress.org>
Co-authored-by: adamsilverstein <adamsilverstein@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Co-authored-by: Adam Silverstein <adamjs@google.com>
Comment on lines +165 to +167
if (
defined( 'EMBED_OPTIMIZER_VERSION' )
) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition seems pointless if we always define the constant. But it is present in the other plugins.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷🏼 very defensive coding

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also check if esc_attr() exists and wrap it in a try/catch block then 😄

*
* @covers ::embed_optimizer_render_generator
*/
public function test_embed_optimizer_render_generator() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, very thorough!

Copy link
Member

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helpful!

@westonruter westonruter merged commit 6d91b5a into feature/lazy-embeds Mar 15, 2024
41 checks passed
@westonruter westonruter deleted the add/embed-optimizer-generator-tag branch March 15, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] JS & CSS Issues related to the JS & CSS focus area (formerly JavaScript) no milestone PRs that do not have a defined milestone for release [Plugin] Embed Optimizer Issues for the Embed Optimizer plugin [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants