-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
Change WordPress.WP.EnqueuedResourceParameters.MissingVersion to warning #1472
Comments
I would like to add that adding parameters to the URL may disable resource caching on the CDN, or even break the URL altogether. |
👍 I think that would be good change. |
It was this issue: WPTT/WPThemeReview#170 |
@moorscode As you did most of the work on this sniff, any thoughts ? |
Any update on this? The boiler plate generated by Underscores failed phpcs, LOL |
@CamelKing The |
Not sure why nobody actioned this before, but PR #2146 should fix it now. |
EnqueuedResourceParameters
is included inWordPress-Extra
.It was recently added via #1378.
While I agree that it's a best practice to add a script version (WP will use its own version anyway if not given), I think we should reconsider this being reported as an error.
Example case, would be registering a script from a CDN e.g.
https://cdn.bootcss.com/backgrid.js/0.3.8/backgrid.min.js
- this already contains the version number, so having to add a version number as a separate argument doesn't make sense.The arg is optional - if it was something that someone must do (for which not doing would be an error), then it wouldn't be optional.
I realise this is for Extra, not Core, and that there are ways for individual projects to ignore, disable or change the type for this violation, but I'd like to see us re-consider changing it in WPCS.
The text was updated successfully, but these errors were encountered: