andrezrv
5/11/2014 - 3:04 PM

Remove query arguments from any enqueued scripts.

Remove query arguments from any enqueued scripts.

<?php
/**
 * Remove query arguments from any enqueued scripts.
 */
function remove_query_args( $src ) {
	if ( strpos( $src, 'ver=' ) ) {
		$src = remove_query_arg( 'ver', $src );
	}
	return $src;
}
add_filter( 'style_loader_src', 'remove_query_args', 9999 );
add_filter( 'script_loader_src', 'remove_query_args', 9999 );