[theme-reviewers] Theme-Check plugin and textdomain

Syahir Hakim khairulsyahir at gmail.com
Wed Jan 19 17:48:32 UTC 2011


Well, that's actually what the Uninstall button in my theme's options 
page does. Basically,
Click on uninstall button > Confirm uninstall > delete database entries 
 > switch theme > redirect to /themes.php?activated=true

As I mentioned, the switch_theme is there so that the theme's 
functions.php file won't be loaded again whenever the user goes to other 
pages in the admin panel, cause the theme checks for existence of its 
options in the database, and add the default options if it doesn't exist.

-- 
Regards,
Syahir Hakim

Contact:
http://www.khairul-syahir.com
+6014 753 1883


On 20/1/2011 1:42 AM, Philip M. Hofer (Frumph) wrote:
> An option button in the theme options to 'delete options'  for right 
> now is the best option imho.
>
>
>
>
>
> ----- Original Message ----- From: "Syahir Hakim" 
> <khairulsyahir at gmail.com>
> To: <theme-reviewers at lists.wordpress.org>
> Sent: Wednesday, January 19, 2011 9:40 AM
> Subject: Re: [theme-reviewers] Theme-Check plugin and textdomain
>
>
>> 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.
>>
>> 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.
>>
>> 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.
>>
>> -- 
>> Regards,
>> Syahir Hakim
>>
>> Contact:
>> http://www.khairul-syahir.com
>> +6014 753 1883
>>
>>
>> On 20/1/2011 12:02 AM, Simon Prosser wrote:
>>> On 01/19/11 15:49, Syahir Hakim wrote:
>>>> Erm...so does the theme-check plugin searches for occurrences of the
>>>> 'twentyten' string, regardless of its context? Clearly in this case my
>>>> theme is not using the twentyten textdomain.
>>> Ive updated the regex to be more strict, its uploaded to SVN but to 
>>> save
>>> time can you just edit textdomain.php in the checks folder and 
>>> change to:
>>>
>>> if ( preg_match( '/(__|_e)\(.*?["|\']twentyten["|\']\s?\)?/', $php ) 
>>> ) {
>>>
>>> and see what happens for you, as far as i can tell it still works ok
>>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>


More information about the theme-reviewers mailing list