[wp-hackers] possible to add data for scripts like you can with styles?

chris chris at lod.com
Fri Mar 1 00:08:43 UTC 2013


Is it possible to do this?

add_action('wp_enqueue_scripts', 'fresh_scripts');

function fresh_scripts() {
        global $wp_scripts;

        wp_register_script( 'css3_media_queries',
'http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js')
;
        $wp_scripts->add_data( 'css3_media_queries', 'conditional', 'lt IE
9' );
    wp_enqueue_script('css3_media_queries');
}

Is what im using but no conditional gets added.





More information about the wp-hackers mailing list