WordPress.org

Make WordPress Core

Ticket #15493: 15493.diff

File 15493.diff, 667 bytes (added by kawauso, 7 years ago)
  • functions.php

     
    431431 */ 
    432432function twentyten_remove_recent_comments_style() { 
    433433        global $wp_widget_factory; 
    434         remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); 
     434        if ( isset( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'] ) ) 
     435                remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); 
    435436} 
    436437add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' ); 
    437438