Remove only gallery CSS in twentyten, leaving the gallery div classes and id intact. see #9015

git-svn-id: https://develop.svn.wordpress.org/trunk@13552 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-03-02 18:08:14 +00:00
parent 0a2d1ad6ec
commit 49de79c941
1 changed files with 2 additions and 2 deletions

View File

@ -139,8 +139,8 @@ endif;
// Remove inline styles on gallery shortcode
if ( ! function_exists( 'twentyten_remove_gallery_css' ) ) :
function twentyten_remove_gallery_css() {
return "\t\t<div class='gallery'>\n\t\t";
function twentyten_remove_gallery_css( $css ) {
return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
}
endif;
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );