• Hello,
    I’m using file_put_contents and file_get_contents functions in my theme to write a small text on a text file stored in the temp folder.

    But the theme-check plugin gives me following warnings:

    WARNING: file_get_contents was found in the file xxx.php possible file operations.
    WARNING: file_put_contents was found in the file xxx.php possible file operations.

    I could not find any alternative wordpress function. Can you please suggest how can I get rid of above warnings?
    Thanks.

    http://wordpress.org/extend/plugins/theme-check/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Why do you need to store anything in a file? Why not use the database?

    Thread Starter casper1

    (@casper1)

    I want to get get the twitter feed, and store in a temp file, so that it does not make requests to twitter everytime the page is load.

    Store the feed in the database temporarily. Themes submitted to the Theme Repository are not allowed to open or write to files – hence the warning in the Theme Check plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Theme-Check] Theme Check gives warning for file_put_contents’ is closed to new replies.