From 468bab05a706f2cc71e326ca1f26fb265900e0c3 Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@16866 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 3aaec46628..9c5bc2ae51 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' ) ) : /**