Initialize WordPress customizer variables
-
04-11-2019 - |
Question
I have recently starting integrating the wordpress customizer into my theme.
Given the fact that i already had a theme options page, i use these values as default values of my new options (in the add_setting parameter).
All my new options are held into a variable called 'theme_options' which is an array of values.
The problem i have is that a user has to visit the customization page and click "save" on his first install to populate the 'theme_options' variable.
I am wondering if there is a way to initialize this field on theme activation directly (just like many theme options framework do).
Thanks in advance !
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange