Add WebP support and dedicated filter for company logo uploads#2933
Open
masteradhoc wants to merge 3 commits intoAutomattic:trunkfrom
Open
Add WebP support and dedicated filter for company logo uploads#2933masteradhoc wants to merge 3 commits intoAutomattic:trunkfrom
masteradhoc wants to merge 3 commits intoAutomattic:trunkfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2932
Changes Proposed in this Pull Request
webpas a default allowed mime type for company logo uploadsjob_manager_company_logo_allowed_mime_typesfilter so developers can customize allowed mime types for company logos without affecting other file fieldsjob_manager_get_allowed_mime_types()) so they stay in sync.webpfilesTesting Instructions
.webpfile as the company logo — it should upload successfully and show an image previewRelease Notes
job_manager_company_logo_allowed_mime_typesallows customizing allowed file types for the company logo fieldNew or Updated Hooks and Templates
job_manager_company_logo_allowed_mime_types— Filters the allowed mime types for the company logo upload field. Applies to both the form validation and the Ajax file uploader. Receives an array ofextension => mime_typepairs. Note: the form validation path uses plain extension keys (e.g.'webp'), while the Ajax uploader uses pipe-separated keys (e.g.'jpg|jpeg|jpe') — both are passed through this same filter.Deprecated Code
Screenshot / Video