From 56d4e9399b76242ca0226a78b9b13891f628b222 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Fri, 3 Jun 2011 18:27:03 -0600 Subject: [PATCH] removing undefined index error on the removal of css for the recent comments widget --- inc/roots-cleanup.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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