Make WordPress Core

Ticket #18753: 18753.twentytwelve.diff

File 18753.twentytwelve.diff, 1.0 KB (added by obenland, 11 years ago)
  • wp-content/themes/twentytwelve/functions.php

     
    128128 * @since Twenty Twelve 1.0
    129129 */
    130130function twentytwelve_scripts_styles() {
    131         global $wp_styles;
    132 
    133131        /*
    134132         * Adds JavaScript to pages with the comment form to support
    135133         * sites with threaded comments (when in use).
     
    155153         * Loads the Internet Explorer specific stylesheet.
    156154         */
    157155        wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' );
    158         $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );
     156        if ( function_exists( 'wp_style_add_data' ) )
     157                wp_style_add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );
     158        else
     159                $GLOBALS['wp_styles']->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );
    159160}
    160161add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' );
    161162