Quantcast
Channel: WordPress.org Forums » [Autoptimize] Support
Viewing all articles
Browse latest Browse all 14038

Frank Goossens on "[Plugin: Autoptimize] Javascript still has comments"

$
0
0

Well, you would have to hook into the filter like this;

add_filter('autoptimize_js_after_minify','kokomoweb_js_after_minfy',10,1);
function kokomoweb_js_after_minify($jsIn) {
	$jsOut=fancy_code_to_remove_important_comments($jsIn);
	return $jsOut;
}

where fancy_code_to_remove_important_comments would probably be some smart regular-expression to remove everything between (and including) /*! and */.

Feel free to share your result here for others to enjoy! :-)

Have fun,
frank


Viewing all articles
Browse latest Browse all 14038

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>