[theme-reviewers] Note to theme reviewers about settings in themes

Syahir Hakim khairulsyahir at gmail.com
Sun Jun 12 21:46:19 UTC 2011

Great tips! I've modified my theme so that it only save the modified 
settings to the database, and not the whole of the theme's settings 
array. If no settings is modified, nothing is saved to the database.

Syahir Hakim

+6421 0333 649

On 13/6/2011 8:26 AM, Otto wrote:
> This is just a note about a rule that I think should be added to the
> theme review process:
> - Themes should not do anything to the database merely by virtue of
> being activated.
> By that, I mean that having a theme check for a setting, like
> get_option or get_theme_mod and then calling set_option or
> set_theme_mod to set it to some default is wrong.
> Both get_option and get_theme_mod accept a second parameter of a
> default setting. If I call get_option('whatever',123) and there is no
> whatever option, then that will return 123.
> Use the defaults properly. Don't set them just because they're not there.
> -Otto
> _______________________________________________
> 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