removing undefined index error on the removal of css for the recent
comments widget
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user