-
Notifications
You must be signed in to change notification settings - Fork 427
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
Failing latest Theme Check #808
Comments
@DeoThemes Sounds more like an issue which should be reported to Theme Check as TGMPA is using the WP_Filesystem for upgrade operations. |
This check is a warning, not an error or requirement. The themes team has no objections to TGMPA using wp_filesystem, the themes team has no objections to using wp_filesystem if there is a clear, legit use case, and no better option available. TGMPA files are not being excluded from the checks, because that would be a security issue, since it would be too easy to bypass theme check that way. |
Thanks @carolinan for clearing that up. I've seen more people getting confused about this. It may be good to let people know that TGMPA is actually using things the right way. |
It is the theme authors responsibility to know what code they place in their theme, even third party code. There is no intention to let the theme check plugin confirm that all TGMPA files are intact, or confirm that the files have not been changed or updated incorrectly. |
I still think it would be better to include this kind of functionality in WP Core, so that the theme authors would not need to add their own solution, since doing that adds to complexity and risk. |
I agree, but we also live in a reality.
It would most definitely be nice to have this kind of functionality in WP Core and I've been advocating as much for years (see: talk about this - slides). All the same, even if it would be implemented in Core, that still probably won't take away the need for external tooling like this as any implementation in Core will have limits to it, like "updates to be retrieved from the wp.org" repo. So for updates from a zip file for purchased add-ons, or updates from an external service, like GitHub, extra logic would need to be added.
As for complexity and risk, there is no difference between a well-build and secure external solution and a WP Core solution. WP Core will always add hooks in strategic places to allow for extending the functionality offered, so that would no more or less secure than the current situation. |
The TGM class can't pass the latest Theme Check when submitting on wordpress.org.
Here is the message:
WARNING: WP_Filesystem was found in the file class-tgm-plugin-activation.php WP_Filesystem should only be used for theme upgrade operations, not for all file operations. Consider using file_get_contents(), scandir(), or glob()
The text was updated successfully, but these errors were encountered: