<font color="#333333"><font size="2"><font face="arial,helvetica,sans-serif">Take a look at this please <a href="http://ottopress.com/2011/tutorial-using-the-wp_filesystem/">http://ottopress.com/2011/tutorial-using-the-wp_filesystem/</a></font></font></font><div>
<font color="#333333"><font size="2"><font face="arial,helvetica,sans-serif"><br clear="all"></font></font></font><div><strong><font face="arial, helvetica, sans-serif">----</font></strong></div><div><font face="arial, helvetica, sans-serif"><strong>Emil Uzelac</strong> | ThemeID | T: 224-444-0006 | Twitter: @EmilUzelac | E: <a href="mailto:emil@themeid.com" target="_blank">emil@themeid.com</a> | <a href="http://themeid.com/" target="_blank">http://themeid.com</a></font></div>
<div><font color="#999999" face="arial, helvetica, sans-serif">Make everything as simple as possible, but not simpler. - Albert Einstein</font></div><br>
<br><br><div class="gmail_quote">On Mon, May 23, 2011 at 4:42 PM, Syahir Hakim <span dir="ltr"><<a href="mailto:khairulsyahir@gmail.com">khairulsyahir@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi everyone,<br>
<br>
I intend to use file_get_contents() to implement an option in my theme where users and/or developers can export and import the theme settings. As the number of options available in theme continue to expand, this will be a very convenient and useful feature, especially for developers who are customising the theme and setting it up locally to quickly deploy it on a live server, rather than going through each and every settings again. Note though that this only concerns the theme's settings, and not WordPress.<br>
<br>
Me and the other developer for the theme intend to use file_get_contents() to read in the json-encoded exported theme settings files when it is uploaded, but as I understand there's a blanket ban on the usage of file operations functions. The file will be handled using the wp_handle_upload() function, and it doesn't need to be retained after the contents are read. And since json_encode() and json_decode() functions are only available since PHP 5.2.1, the theme will display a message saying that the theme settings import/export feature is not available to those users.<br>
<br>
Note that this settings is intended to make things easier for the theme users and those who are developing a site based on the theme. It will not cause any performance issue at all in the front end. Please let me know if the use of file_get_contents() can be allowed for this specific case, or if not, what are the alternatives that I may consider.<br>
<br>
Thanks!<br>
<br>
-- <br>
Regards,<br>
Syahir Hakim<br>
<br>
Contact:<br>
<a href="http://www.khairul-syahir.com" target="_blank">http://www.khairul-syahir.com</a><br>
+6421 0333 649<br>
<br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
</blockquote></div><br></div>