I have been attempting to create a theme reset button for the theme customizer that automatically removes all of the theme_mod settings. I have tried multiple ways to do this and have never been able to get it to work. As seen here.
After multiple failed attempts using the remove_theme_mods approach I begin to wonder if that is my problem other than the ajax and javascript being faulty and not properly binding the button.
Since I save all defaults into one big array so when my theme is installed it automatically has values populated on the theme customizer page, and the theme has a specific look… I was thinking I could try a different approach to instead remove the theme settings I just over ride them, maybe with a custom control? Possibly by somehow assigning these default values to all settings? I really hope someone can help me get this going. If you have any ideas I would appreciate it very very much.
Here is an example of how I assign the default values for the theme:
function newtheme_get_theme_mods() {
$defaults = array(
'newtheme_responsive' => true,
'newtheme_hero_title' => 'Beautiful and Elegant',
'newtheme_hero_description' => 'The best theme in the world',
'newtheme_header_logo' => '/wp-content/themes/newtheme/img/logo.png',
'newtheme_header_background_color' => 'rgba(35,35,35, 0.9)'
return $defaults;
}