Make WordPress Core

Changeset 16522


Ignore:
Timestamp:
11/21/2010 01:55:11 PM (14 years ago)
Author:
nacin
Message:

Add a simple filter to allow removing the recent comments default widget styles. fixes #15493, see #14876.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/functions.php

    r16480 r16522  
    431431 */
    432432function twentyten_remove_recent_comments_style() {
    433     global $wp_widget_factory;
    434     remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
     433    add_filter( 'show_recent_comments_widget_style', '__return_false' );
    435434}
    436435add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );
  • trunk/wp-includes/default-widgets.php

    r16431 r16522  
    615615    }
    616616
    617     function recent_comments_style() { ?>
     617    function recent_comments_style() {
     618        if ( ! current_theme_supports( 'widgets' ) // Temp hack #14876
     619            || ! apply_filters( 'show_recent_comments_widget_style', true, $this->id_base ) )
     620            return;
     621        ?>
    618622    <style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
    619623<?php
Note: See TracChangeset for help on using the changeset viewer.