Title: Support for wp_script_add_data
Last modified: September 1, 2016

---

# Support for wp_script_add_data

 *  [jaroat](https://wordpress.org/support/users/jaroat/)
 * (@jaroat)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/support-for-wp_script_add_data/)
 * Hi Khang –
 * First of all: Wonderful plugin – works like a charm!
 * Any chance you implement support for wp_script_add_data (since WP 4.2)? With 
   help of that command, you can augment scripts with ie conditional comments for
   example.
 * Example (twitter bootstrap) – can be seen on the wp docs:
    [https://developer.wordpress.org/reference/functions/wp_script_add_data/](https://developer.wordpress.org/reference/functions/wp_script_add_data/)
 * the following
 *     ```
       wp_enqueue_script('theme-bootstrap-html5-shim', get_template_directory_uri() . '/resources/js/html5shiv-3.7.3.min.js', array());
       wp_script_add_data('theme-bootstrap-html5-shim', 'conditional', 'lt IE 9');
       ```
   
 * gets rendered as
 *     ```
       <!--[if lt IE 9]>
       <script type='text/javascript' src='http://some.domain.tld/wp-content/themes/rsvp/resources/js/html5shiv-3.7.3.min.js?ver=4.5.3'></script>
       <![endif]-->
       ```
   
 * if supported, better wordpress minify could group all scripts/styles with the
   same key/value and minify them together …
 * right now, those marked scripts loose that mark and get minified to the rest 
   of the scripts.
 * br from Salzburg, Austria!
 * – Johannes
 * [https://wordpress.org/plugins/bwp-minify/](https://wordpress.org/plugins/bwp-minify/)

The topic ‘Support for wp_script_add_data’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bwp-minify.svg)
 * [Better WordPress Minify](https://wordpress.org/plugins/bwp-minify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bwp-minify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bwp-minify/)
 * [Active Topics](https://wordpress.org/support/plugin/bwp-minify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bwp-minify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bwp-minify/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [jaroat](https://wordpress.org/support/users/jaroat/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/support-for-wp_script_add_data/)
 * Status: not resolved