Commit 7c1341d5 authored by lucha's avatar lucha
Browse files

close-old-comments: use constant default instead of depending on cets_blog_defaults_options

parent 25661489
Pipeline #16216 passed with stage
in 8 seconds
......@@ -20,12 +20,10 @@ function override_close_comments_days_old($value, $option){
$days_old = (int) $value;
if ( ! $days_old ) {
$default_options = get_site_option('cets_blog_defaults_options');
$days_old = $default_options['close_comments_days_old'];
update_option('close_comments_days_old', $days_old);
$days_old = 15;
}
return $days_old;
return $days_old;
}
add_filter( 'option_close_comments_days_old', override_close_comments_days_old, 10, 2);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment