[theme-reviewers] what are the rules for file access in themes?

Simon Prosser pross at pross.org.uk
Thu Jan 10 18:45:38 UTC 2013


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
database.

On 10 January 2013 18:14, Andrey "Rarst" Savchenko <contact at rarst.net> wrote:
> 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 they
> might be used rather than with their presence in general.
>
> However I had found mentions on forum alike "Themes submitted to the Theme
> Repository are not allowed to open or write to files - hence the warning in
> the Theme Check plugin."
> http://wordpress.org/support/topic/plugin-theme-check-theme-check-gives-warning-for-file_put_contents?replies=4
> 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


More information about the theme-reviewers mailing list