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
This commit is contained in:
Andrew Nacin 2010-12-10 19:27:12 +00:00
parent 41d4279b66
commit 468bab05a7
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.
*
* 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( "#<style type='text/css'>(.*?)</style>#s", '', $css );
}
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
if ( ! function_exists( 'twentyten_comment' ) ) :
/**