diff --git a/inc/roots-cleanup.php b/inc/roots-cleanup.php index e36765b..1b43170 100644 --- a/inc/roots-cleanup.php +++ b/inc/roots-cleanup.php @@ -155,7 +155,9 @@ function roots_rel_canonical() { // remove CSS from recent comments widget function roots_remove_recent_comments_style() { global $wp_widget_factory; - remove_action( 'wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style') ); + if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) { + remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style')); + } } // remove CSS from gallery