I have a view. I altered it with hook_views_default_views_alter(). To make my changed become active I need to go to the UI and revert it back to the altered default.
How can I make the new default active programmatically instead?
In other words: How can I alter a views default and make it active programmatically?
I don't understand what you're asking, but it sounds like you want to revert the view.
You need to include
module_load_include('module', 'views')andmodule_load_include('inc', 'views', 'drush/views.drush'). And the function to revert all viewsviews_revert_allviews(views_get_all_views());.Check function hook_views_default_views_alter for more info.