Permalink
Browse files

Merge pull request #1 from maxfenton/patch-1

Check that comments haven't already been removed
  • Loading branch information...
2 parents 37953be + 8a00e6b commit 4bbd0d83a40aaa948c90738732354b13a3bcba07 @aarontgrogg committed Jul 15, 2015
Showing with 3 additions and 1 deletion.
  1. +3 −1 functions.php
View
@@ -465,7 +465,9 @@ function boilerplate_widgets_init() {
*/
function boilerplate_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 ( !empty( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'] ) ) {
+ remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
+ }
}
endif;
add_action( 'widgets_init', 'boilerplate_remove_recent_comments_style' );

0 comments on commit 4bbd0d8

Please sign in to comment.