theme options 101 for theme developers

Hi acrylian/sbillard,

As I go through updating my themes for the new release coming up, I am trying to streamline the theme options. Can you please clarify what the purpose/difference is between the following:

setThemeOption
setThemeOptionDefault
setOption
setOptionDefault

I think I know, but I am not sure.

Also, it seems we can now set core theme options different between themes (for example default thumb sizes and default image sizes). Was this just added or have I been missing it?

Also, can you tell me when themeoptions.php is called, as to set the options in the database? From what I can tell it is called on a theme switch or when pulling up the theme option page, is that correct?

Thanks!

Comments

  • acrylian Administrator, Developer
    The default ones are the initial values set the first time. Similar to the default values setup sets on installation. Yes, the theme options is called on a switch (sets the defaults if not set) and otherwise if calling the theme options tab.

    Theme specific options are not that new. For example colorbox has this for quite some time so you don't need to load scripts on pages where you don't need them.
Sign In or Register to comment.