Modern Image Formats: link to FAQ from settings section#2480
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. |
Adds a brief note with a link to the plugin FAQ on WordPress.org in the Modern Image Formats settings section on Settings > Media. Users frequently open support topics confused about why uploads aren't generating AVIF/WebP files — the FAQ already explains the common reason (converted file discarded when larger than original), so the settings UI now points there rather than duplicating the text. Fixes WordPress#2442. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6ac4526 to
5601df6
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #2480 +/- ##
==========================================
+ Coverage 69.33% 69.86% +0.52%
==========================================
Files 90 90
Lines 7749 7759 +10
==========================================
+ Hits 5373 5421 +48
+ Misses 2376 2338 -38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| 'perflab_modern_image_format_settings', | ||
| _x( 'Modern Image Formats', 'settings page section name', 'webp-uploads' ), | ||
| '__return_empty_string', | ||
| 'webp_uploads_modern_image_format_settings_section_callback', |
There was a problem hiding this comment.
I think a closure here would make more sense than a global function.
| /** | ||
| * Renders the description for the Modern Image Formats settings section. | ||
| * | ||
| * @since 3.10.0 |
There was a problem hiding this comment.
FYI: we use n.e.x.t for version numbers and then update them before a release.
…ings_fields Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
….e.x.t version Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Fixes #2442.
Users frequently open support topics confused about why their uploads aren't generating AVIF/WebP files. The FAQ in
readme.txtalready explains the primary reason (the plugin discards converted images that would be larger than the original), but there was nothing in the admin UI pointing users there.This adds a brief note with a link to the plugin FAQ on WordPress.org in the Modern Image Formats settings section on Settings > Media, so users can find the explanation without having to search the support forums.
The section previously used
__return_empty_stringas its callback (no description rendered). This replaces it with a dedicated callback that outputs a single sentence linking to the FAQ.Changes
plugins/webp-uploads/settings.php: replace__return_empty_stringsection callback withwebp_uploads_modern_image_format_settings_section_callback()which renders a FAQ linkplugins/webp-uploads/tests/test-settings.php: add test asserting the callback outputs the FAQ URL and an anchor tagTest plan
https://wordpress.org/plugins/webp-uploads/#faqcomposer test:integration -- --filter test_webp_uploads_modern_image_format_settings_section_callback