firsttec_remove_recent_comments_style

Removes the default styles that are packaged with the Recent Comments widget.

Description

firsttec_remove_recent_comments_style(); 

To override this in a child theme, remove the filter and optionally add your own function tied to the widgets_init action hook.

This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1 to remove the default style. Using Twenty Ten 1.2 in WordPress 3.0 will show the styles, but they won't have any effect on the widget in default Twenty Ten styling.


Usage

  1. if ( !function_exists( 'firsttec_remove_recent_comments_style' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = firsttec_remove_recent_comments_style(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function firsttec_remove_recent_comments_style() { 
  2. add_filter( 'show_recent_comments_widget_style', '__return_false' );