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
This commit is contained in:
nacin 2010-12-10 19:27:12 +00:00
parent 96b5c58ec2
commit d1cc06bac1
1 changed files with 14 additions and 2 deletions

View File

@ -282,15 +282,27 @@ add_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' );
/** /**
* Remove inline styles printed when the gallery shortcode is used. * 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 * @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. * @return string The gallery style filter, with the styles themselves removed.
*/ */
function twentyten_remove_gallery_css( $css ) { function twentyten_remove_gallery_css( $css ) {
return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css ); return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
} }
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
if ( ! function_exists( 'twentyten_comment' ) ) : if ( ! function_exists( 'twentyten_comment' ) ) :
/** /**