-
Notifications
You must be signed in to change notification settings - Fork 37
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
No php file functions #71
Comments
I have this sniff ready to go and will upload after final testing. |
If the check is failing which it was in the Theme Check it should have been Required instead of a Warning so an Error is OK. |
Just throwing a note out there - This TRT rule makes themes effectively hide what they're doing, when it's a completely legitimate use-case for the direct filesystem calls. |
^ One of the reasons I've been pushing to get |
@dd32 As these things are in WPCS as well, I'd love to hear your voice in the discussion being had here: WordPress/WordPress-Coding-Standards#1265. (Merged) PR WordPress/WordPress-Coding-Standards#1374 in response to WordPress/WordPress-Coding-Standards#943 is hopefully a step in the right direction ? |
What is the status of this issue? |
[Implement sniff] Look for list of php file functions using WordPress.Functions.FunctionRestrictionsSniff
Rule type:
Error
Rule:
Ref: https://make.wordpress.org/themes/handbook/review/required/#core-functionality-and-features
ERROR| Verify that file system calls use the WP_Filesystem method and not PHP native functions. For a list of functions to trigger on, see Theme-Check plugin - /checks/malware.php
Theme check file covering this rule:
https://github.com/Otto42/theme-check/blob/master/checks/malware.php
Decision needed:
I have changed this from WARNING to ERROR. It is very easy to change back, but I thought it appropriate to be an ERROR. Are there any cases where use of these functions are acceptable?
To do:
sniffname
sniff to the ruleset.The text was updated successfully, but these errors were encountered: