<div dir="ltr">So here's a question that leads from this discussion: what about third party libraries?<div><br></div><div style>I have a very personal interest in this -- in the course of redesigning/refactoring my current theme, I went a bit LESS-happy. I've got some (IMHO) awesome LESS compilation going on behind-the-scenes using WP-LESS/lessphp, allowing for both configurability/flexibility AND lessened load times. Again, my opinion: awesome.</div>
<div style><br></div><div style>Then I saw this post (<a href="http://wordpress.org/support/topic/plugin-theme-check-theme-check-gives-warning-for-file_put_contents?replies=4#post-2969266">http://wordpress.org/support/topic/plugin-theme-check-theme-check-gives-warning-for-file_put_contents?replies=4#post-2969266</a>) which led to Rarst sending this email, and I thought "Crap. Never even thought to check."</div>
<div style><br></div><div style>Turns out that lessphp is pretty well file_put/file_get'd up.</div><div style><br></div><div style>1) So my options are: reimplement lessphp/lessc using only WP-friendly functions</div>
<div style>2) Drop functionality from theme entirely</div><div style>3) Remove theme from repo and distribute entirely on my site and my site only</div><div style><br></div><div style>I'm not liking any of those options. Is there a fourth (or fifth, or sixth, or...)?</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 10, 2013 at 1:45 PM, Simon Prosser <span dir="ltr"><<a href="mailto:pross@pross.org.uk" target="_blank">pross@pross.org.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There is no need to use either of those functions ever.<br>
<br>
if you have to read in a file, use the file() command:<br>
file( $filename, FILE_SKIP_EMPTY_LINES );<br>
<br>
If you absolutely have to write a file to the filesystem, wordpress<br>
has an API for that already, but temporary data is best stored in the<br>
database.<br>
<div><div class="h5"><br>
On 10 January 2013 18:14, Andrey "Rarst" Savchenko <<a href="mailto:contact@rarst.net">contact@rarst.net</a>> wrote:<br>
> Theme Check plugin lists presence of most of PHP file access functions as<br>
> warning. In code it's under MalwareCheck which suggest issue with how they<br>
> might be used rather than with their presence in general.<br>
><br>
> However I had found mentions on forum alike "Themes submitted to the Theme<br>
> Repository are not allowed to open or write to files - hence the warning in<br>
> the Theme Check plugin."<br>
> <a href="http://wordpress.org/support/topic/plugin-theme-check-theme-check-gives-warning-for-file_put_contents?replies=4" target="_blank">http://wordpress.org/support/topic/plugin-theme-check-theme-check-gives-warning-for-file_put_contents?replies=4</a><br>
> and no mention at all in Codex.<br>
><br>
> What are the repository rules on:<br>
><br>
> 1. Reading files in theme.<br>
> 2. Writing files in theme.<br>
> 3. [Not] using filesystem APIs to do either (if applicable).<br>
><br>
> TIA<br>
> --<br>
> <a href="http://www.Rarst.net/" target="_blank">http://www.Rarst.net/</a><br>
><br>
</div></div>> _______________________________________________<br>
> theme-reviewers mailing list<br>
> <a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
> <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
My Blog: <a href="http://pross.org.uk/" target="_blank">http://pross.org.uk/</a><br>
Plugins : <a href="http://pross.org.uk/plugins/" target="_blank">http://pross.org.uk/plugins/</a><br>
Themes: <a href="http://wordpress.org/extend/themes/profile/pross" target="_blank">http://wordpress.org/extend/themes/profile/pross</a><br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>-Doug<br><br><br>
</div>