function comment_post_update_add_ip_address_setting
Add comment settings.
File
-
core/
modules/ comment/ comment.post_update.php, line 43
Code
function comment_post_update_add_ip_address_setting() {
$config_factory = \Drupal::configFactory();
$settings = $config_factory->getEditable('comment.settings');
$settings->set('log_ip_addresses', TRUE)
->save(TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.