From d1cc06bac1f79675f1e2dfcc0cd0b3f12f051c04 Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 10 Dec 2010 19:27:12 +0000 Subject: [PATCH] Deprecate twentyten_remove_gallery_css in favor of the use_default_gallery_style filter. see #15103. git-svn-id: http://svn.automattic.com/wordpress/trunk@16866 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyten/functions.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php index 3aaec4662..9c5bc2ae5 100644 --- a/wp-content/themes/twentyten/functions.php +++ b/wp-content/themes/twentyten/functions.php @@ -282,15 +282,27 @@ add_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' ); /** * Remove inline styles printed when the gallery shortcode is used. * - * Galleries are styled by the theme in Twenty Ten's style.css. + * Galleries are styled by the theme in Twenty Ten's style.css. This is just + * a simple filter call that tells WordPress to not use the default styles. + * + * @since Twenty Ten 1.3 + */ +add_filter( 'use_default_gallery_style', '__return_false' ); + +/** + * Deprecated way to remove inline styles printed when the gallery shortcode is used. + * + * This function is no longer needed or used. Use the use_default_gallery_style + * filter instead, as seen above. * * @since Twenty Ten 1.0 + * @deprecated Deprecated in Twenty Ten 1.3 for WordPress 3.1 + * * @return string The gallery style filter, with the styles themselves removed. */ function twentyten_remove_gallery_css( $css ) { return preg_replace( "##s", '', $css ); } -add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); if ( ! function_exists( 'twentyten_comment' ) ) : /**