Is there a way to have a function called only once (one time) when the theme settings are saved.
This function is a mapping between class terms (user inputs) and their internal ID.
Basically I call
on each class term of the user input.
Then I need to share this mapping of settings across my theme.
I believe it is un-necessary to build the mapping (with api search) every time an item page is loaded.
Anyway, this is a matter of optimization, and it works as it is.