WordPress.org

Make WordPress Core

Changeset 16866


Ignore:
Timestamp:
12/10/2010 07:27:12 PM (7 years ago)
Author:
nacin
Message:

Deprecate twentyten_remove_gallery_css in favor of the use_default_gallery_style filter. see #15103.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/functions.php

    r16675 r16866  
    283283 * Remove inline styles printed when the gallery shortcode is used.
    284284 *
    285  * Galleries are styled by the theme in Twenty Ten's style.css.
    286  *
    287  * @since Twenty Ten 1.0
     285 * Galleries are styled by the theme in Twenty Ten's style.css. This is just
     286 * a simple filter call that tells WordPress to not use the default styles.
     287 *
     288 * @since Twenty Ten 1.3
     289 */
     290add_filter( 'use_default_gallery_style', '__return_false' );
     291
     292/**
     293 * Deprecated way to remove inline styles printed when the gallery shortcode is used.
     294 *
     295 * This function is no longer needed or used. Use the use_default_gallery_style
     296 * filter instead, as seen above.
     297 *
     298 * @since Twenty Ten 1.0
     299 * @deprecated Deprecated in Twenty Ten 1.3 for WordPress 3.1
     300 *
    288301 * @return string The gallery style filter, with the styles themselves removed.
    289302 */
     
    291304    return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
    292305}
    293 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
    294306
    295307if ( ! function_exists( 'twentyten_comment' ) ) :
Note: See TracChangeset for help on using the changeset viewer.