views:

28

answers:

2

i want to change theme_username, a core theme function that outputs that dreadful "not verified" string on users who are not logged in (when they comment, for example). i want a checkbox in admin/build/themes/settings/MYTHEME to change that. but since that theme function gets called a lot, will it hurt the performance of any site using my theme or are theme settings cached?

A: 

Theme settings is usually stored with variable_set. So you need a query to check it. But you can cache the result yourself, with a static variable.

googletorp
+2  A: 

Theme settings are cached as specified in the Drupal API page for theme_get_setting($setting_name, $refresh = FALSE).

sirhc
precisely what i needed to know, thanks.
barraponto

related questions