1 system.install | system_update_1015() |
Convert RSS publishing settings to use configuration files.
Related topics
File
- core/
modules/ system/ system.install, line 1988 - Install, update and uninstall functions for the system module.
Code
function system_update_1015() {
// Migrate variables to config.
$config = config('system.core');
$config->set('rss_description', update_variable_get('feed_description', ''));
$config->set('rss_limit', update_variable_get('feed_default_items', 10));
// cspell:disable-next-line
$config->set('rss_viewmode', update_variable_get('feed_item_length', 'fulltext'));
$config->save();
// Delete variables.
update_variable_del('feed_description');
update_variable_del('feed_default_items');
update_variable_del('feed_item_length');
}