In our development process we have several branches of the same theme for each developer. Theme branches live in different directory names, so when doing get_theme_mod()
, get_option("stylesheet")
can return different values, should we for some reason (customer demo) be forced to activate another theme branch besides "master".
This makes us have to reconfigure menus, widgets, customizer mods etc etc.
In our case, it's very rare that theme mods need to be different across branches, so I would like get_theme_mod()
to always access the same mods array.
The obvious solution seems to be making "pre_option_stylesheet
" filter as a standard part of the theme codebase, but I am not sure if it may have any unintended side effects. Grepping around, looks like this option is almost exclusively used in a few places in wp-includes/theme.php
.
Q: Is "pre_option_stylesheet
" filter the way to go here? Or can you think of something else?