Skip to content

Commit

Permalink
Back compat with the gallery_style filter in Twenty Ten. fixes #16610…
Browse files Browse the repository at this point in the history
… for trunk.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Feb 22, 2011
1 parent 1445d78 commit 1687dd2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions wp-content/themes/twentyten/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ function twentyten_custom_excerpt_more( $output ) {
function twentyten_remove_gallery_css( $css ) {
return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
}
// Backwards compatibility with WordPress 3.0.
if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) )
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );

if ( ! function_exists( 'twentyten_comment' ) ) :
/**
Expand Down Expand Up @@ -443,6 +446,10 @@ function twentyten_widgets_init() {
* To override this in a child theme, remove the filter and optionally add your own
* function tied to the widgets_init action hook.
*
* This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1
* to remove the default style. Using Twenty Ten 1.2 in WordPress 3.0 will show the styles,
* but they won't have any effect on the widget in default Twenty Ten styling.
*
* @since Twenty Ten 1.0
*/
function twentyten_remove_recent_comments_style() {
Expand Down

0 comments on commit 1687dd2

Please sign in to comment.