Back compat with the gallery_style filter in Twenty Ten. fixes #16610 for trunk.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-02-22 08:23:30 +00:00
parent 1445d78cf0
commit 1687dd21b2
1 changed files with 7 additions and 0 deletions

View File

@ -303,6 +303,9 @@ add_filter( 'use_default_gallery_style', '__return_false' );
function twentyten_remove_gallery_css( $css ) {
return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
}
// Backwards compatibility with WordPress 3.0.
if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) )
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
if ( ! function_exists( 'twentyten_comment' ) ) :
/**
@ -443,6 +446,10 @@ add_action( 'widgets_init', 'twentyten_widgets_init' );
* 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.
*
* @since Twenty Ten 1.0
*/
function twentyten_remove_recent_comments_style() {