Add explanation notice for modern image format settings#2443
Add explanation notice for modern image format settings#2443reverb256 wants to merge 2 commits intoWordPress:trunkfrom
Conversation
Users frequently open support topics confused about why their uploads aren't generating AVIF/WebP files. The plugin discards converted files that are larger than the original (default behavior). This adds an informational notice to the Modern Image Formats settings section that explains this behavior and links to the plugin FAQ. Uses existing notice notice-info inline pattern from other callbacks. Fixes WordPress#2442
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @reverb256. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #2443 +/- ##
==========================================
+ Coverage 69.33% 69.38% +0.05%
==========================================
Files 90 90
Lines 7749 7762 +13
==========================================
+ Hits 5373 5386 +13
Misses 2376 2376
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:
|
Covers webp_uploads_render_settings_section_info() which was flagged by Codecov as 0% patch coverage. Test asserts the info notice contains: - notice-info CSS class - Explanation about modern format generation - Link to the plugin FAQ
Summary
Fixes #2442
Users frequently open support topics confused about why their uploads aren't generating AVIF/WebP files. The plugin discards converted files if they're larger than the original (
webp_uploads_discard_larger_generated_imagesdefaults totrue), but there was no explanation in the admin dashboard.Changes
__return_empty_stringsection callback withwebp_uploads_render_settings_section_info()which renders an informational notice in the Modern Image Formats settings sectionnotice notice-info inlinepattern used in other setting callbacks in this fileScreenshots
The notice appears at the top of the Modern Image Formats settings section, before the output format dropdown:
Testing
php -l— no syntax errorsphpcs --standard=WordPress-Core— zero violationsphpstan analyse— no errorsAI Disclosure
AI tooling (Claude) was used to assist with code generation and analysis. The code was reviewed, tested, and validated manually.