this is the code im using to call script if the browser is ie
<!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <style type="text/css"> .clear { zoom: 1;display: block;} </style> <![endif]-->
but how can i add this on function.php as normal way we do this to call the js
wp_register_script('html5js', ("http://html5shiv.googlecode.com/svn/trunk/html5.js"), false, '1.3.2');
wp_enqueue_script('html5js');
and i dont want to statically insert the code on header is there any other way to generate comment?
There is a generic way to use conditional comments â for styles. But unfortunately not for scripts until #16024 will be fixed. The details are described in this answer.
To make your themes scripts filterable you could use a callback on
wp_print_scripts
and apply a custom filter in there.A plugin or child theme author can now handle this by either changing the parameter via the filter or remove the hook completely. (By the way, the version parameter does not make sense on combination with a url to the trunk. You may consider to link to a fix version of the script.)