Skip to content

Commit

Permalink
Merge pull request #1 from maxfenton/patch-1
Browse files Browse the repository at this point in the history
Check that comments haven't already been removed
  • Loading branch information
aarontgrogg committed Jul 15, 2015
2 parents 37953be + 8a00e6b commit 4bbd0d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions.php
Expand Up @@ -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' );
Expand Down

0 comments on commit 4bbd0d8

Please sign in to comment.