move theme setting in a custom function