[theme-reviewers] what are the rules for file access in themes?
zamoose at gmail.com
Thu Jan 10 19:39:33 UTC 2013
So here's a question that leads from this discussion: what about third
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.
Then I saw this post (
which led to Rarst sending this email, and I thought "Crap. Never even
thought to check."
Turns out that lessphp is pretty well file_put/file_get'd up.
1) So my options are: reimplement lessphp/lessc using only WP-friendly
2) Drop functionality from theme entirely
3) Remove theme from repo and distribute entirely on my site and my site
I'm not liking any of those options. Is there a fourth (or fifth, or sixth,
On Thu, Jan 10, 2013 at 1:45 PM, Simon Prosser <pross at pross.org.uk> wrote:
> There is no need to use either of those functions ever.
> if you have to read in a file, use the file() command:
> file( $filename, FILE_SKIP_EMPTY_LINES );
> If you absolutely have to write a file to the filesystem, wordpress
> has an API for that already, but temporary data is best stored in the
> On 10 January 2013 18:14, Andrey "Rarst" Savchenko <contact at rarst.net>
> > Theme Check plugin lists presence of most of PHP file access functions as
> > warning. In code it's under MalwareCheck which suggest issue with how
> > might be used rather than with their presence in general.
> > However I had found mentions on forum alike "Themes submitted to the
> > Repository are not allowed to open or write to files - hence the warning
> > the Theme Check plugin."
> > and no mention at all in Codex.
> > What are the repository rules on:
> > 1. Reading files in theme.
> > 2. Writing files in theme.
> > 3. [Not] using filesystem APIs to do either (if applicable).
> > TIA
> > --
> > http://www.Rarst.net/
> > _______________________________________________
> > theme-reviewers mailing list
> > theme-reviewers at lists.wordpress.org
> > http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> My Blog: http://pross.org.uk/
> Plugins : http://pross.org.uk/plugins/
> Themes: http://wordpress.org/extend/themes/profile/pross
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the theme-reviewers