mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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:
parent
96b5c58ec2
commit
d1cc06bac1
@ -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' ) ) :
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user