mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Add a simple filter to allow removing the recent comments default widget styles. fixes #15493, see #14876.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d30ef21e80
commit
72a354331b
@ -430,8 +430,7 @@ add_action( 'widgets_init', 'twentyten_widgets_init' );
|
|||||||
* @since Twenty Ten 1.0
|
* @since Twenty Ten 1.0
|
||||||
*/
|
*/
|
||||||
function twentyten_remove_recent_comments_style() {
|
function twentyten_remove_recent_comments_style() {
|
||||||
global $wp_widget_factory;
|
add_filter( 'show_recent_comments_widget_style', '__return_false' );
|
||||||
remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
|
|
||||||
}
|
}
|
||||||
add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );
|
add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );
|
||||||
|
|
||||||
|
@ -614,7 +614,11 @@ class WP_Widget_Recent_Comments extends WP_Widget {
|
|||||||
add_action( 'transition_comment_status', array(&$this, 'flush_widget_cache') );
|
add_action( 'transition_comment_status', array(&$this, 'flush_widget_cache') );
|
||||||
}
|
}
|
||||||
|
|
||||||
function recent_comments_style() { ?>
|
function recent_comments_style() {
|
||||||
|
if ( ! current_theme_supports( 'widgets' ) // Temp hack #14876
|
||||||
|
|| ! apply_filters( 'show_recent_comments_widget_style', true, $this->id_base ) )
|
||||||
|
return;
|
||||||
|
?>
|
||||||
<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
|
<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user