removing undefined index error on the removal of css for the recent

comments widget
This commit is contained in:
Ben Word
2011-06-03 18:27:03 -06:00
parent bc2da28d6a
commit 56d4e9399b

View File

@@ -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