From e63f2549db672212e07f5c44cd54103c6b8f6b8c Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 22 Feb 2011 08:23:30 +0000 Subject: [PATCH] Back compat with the gallery_style filter in Twenty Ten. fixes #16610 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@17478 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-content/themes/twentyten/functions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php index 3f236c95f6..36f55066f9 100644 --- a/wp-content/themes/twentyten/functions.php +++ b/wp-content/themes/twentyten/functions.php @@ -303,6 +303,9 @@ add_filter( 'use_default_gallery_style', '__return_false' ); function twentyten_remove_gallery_css( $css ) { return preg_replace( "##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() {