-
Notifications
You must be signed in to change notification settings - Fork 55
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
Implement WP_Filesystem API for writing/reading files #27
Comments
The problem with This is made worse by the fact that WP_Filesystem only allows direct writing in specific circumstances, even though Thats the reason I'm not using it in BackUpWordPress for writing the backup files. You could obviously work round it by prompting people to define their FTP/SFTP/FTPS details in |
Cheers Tom, I realised this is a total no go as the lessc class uses file_put_contents etc... Best keep this is a plugin and go the theme dependency route. |
Maybe we should update the README with this info... |
I'm reopening this one for discussion as I want to try using the It would be easy enough to test if it works at which point we could use that to take advantage of the automatic chmod'ing it does for security reasons. One other reason for reconsidering is folks using origin-push CDN setups. Although for that particular case the best bet would be to add a post-compile action hook with the URLs and paths etc... |
I don't see much benefit other than chmod (which is to-be-really-sure kind of a thing in this context), however no downside either. To be fancy can try to write properly with filesystem and fall back to direct instead of asking credentials. The small issue is overriding filesystem write(s) (there seems to be total of one, but I hadn't looked hard) in lessc, but can subclass it for that. |
I'm using this class in a theme, tied to the theme customization API to provide real time color automation. I'm at the end of it and bug checking before submitting to repo, and Theme Check is of course flagging the file_put_contents. If there's any way we can utilize WP Filesystem API that would be rad. |
Hi Nick, I did look into it some time ago but the only use case so far is You could ask on the theme reviewers mailing list if it's ok They make exceptions for the likes of pagelines so it's not outside the |
Fair enough, and totally understandable. Thanks man, appreciate the response. |
This is aiming to make the plugin more embeddable in themes, it will have to use the filesystem API if it's to be able to pass the theme checker for hosting on wp.org. Also it makes for better security.
Of course it also depends on lessphp itself so may be a no go.
The text was updated successfully, but these errors were encountered: