I want my theme to control certain block settings, like which elements of the system branding block are enabled. To me it makes sense for that to be code in the theme, not a module, because at the moment the only way I've found to access the config programmatically involves using the theme name.
/** @var Drupal\Core\Config\Config $config */ $config = \Drupal::service('config.factory')->getEditable('block.block.my_theme_branding'); $config->set('settings.use_site_logo', false); $config->save();
Since this is a one off config change, I think it should only happen when the theme is installed/activated. It there a theme function/hook that behaves like
hook_install does for modules?