[theme-reviewers] Theme-Check plugin and textdomain

Chip Bennett chip at chipbennett.net
Wed Jan 19 17:43:14 UTC 2011


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.

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

Chip

On Wed, Jan 19, 2011 at 11:40 AM, Syahir Hakim <khairulsyahir at gmail.com>wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110119/5ea831eb/attachment.htm>


More information about the theme-reviewers mailing list