1) As laudable as is your intent with the switch_theme() functionality, it is probably best left out of the Theme. Let the user (and WordPress) handle such operations.<div><br></div><div>2) Again, as laudable as is your intent with removing Theme options from the DB, it is probably best to wait until Themes get an uninstall hook. (We can only hope that this will happen in 3.2. If not; we keep pushing for it...)</div>
<div><br></div><div>Chip<br><br><div class="gmail_quote">On Wed, Jan 19, 2011 at 11:40 AM, 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;">
It's still showing the warning that the theme is using the twentyten textdomain. I guess you'd have to include the gettext functions ( __, _e, _n, etc.) or exclude 'switch_theme' in the regex.<br>
<br>
Anyways, it's not really that big of a deal, but I'm just wondering if this would cause my theme to fail the upload check at the WP.org repository.<br>
<br>
And since we're on this topic, how would you guys suggest the best way to implement an option to delete the theme's options from the database? The reason why I use the switch_theme function is so that the user won't be loading the theme again when the page is reloaded, cause otherwise the theme will detect that its options entry does not exist in the database and will write the default values to the database again.<div class="im">
<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>
+6014 753 1883<br>
<br>
<br></div><div class="im">
On 20/1/2011 12:02 AM, Simon Prosser wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 01/19/11 15:49, Syahir Hakim wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Erm...so does the theme-check plugin searches for occurrences of the<br>
'twentyten' string, regardless of its context? Clearly in this case my<br>
theme is not using the twentyten textdomain.<br>
</blockquote>
Ive updated the regex to be more strict, its uploaded to SVN but to save<br>
time can you just edit textdomain.php in the checks folder and change to:<br>
<br>
if ( preg_match( '/(__|_e)\(.*?["|\']twentyten["|\']\s?\)?/', $php ) ) {<br>
<br>
and see what happens for you, as far as i can tell it still works ok<br>
<br>
</blockquote></div><div><div></div><div class="h5">
_______________________________________________<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>
</div></div></blockquote></div><br></div>