FutureMedia
11/4/2017 - 11:55 AM

versioning3.php

<?php
//
// 
function set_custom_ver_css_js( $src ) {
	// style.css URI
	$style_file = get_stylesheet_directory().'/style.css'; 

	if ( $style_file ) {
		// css file timestamp
		$version = filemtime($style_file); 
		
		if ( strpos( $src, 'ver=' ) )
			// use the WP function add_query_arg() 
			// to set the ver parameter in 
			$src = add_query_arg( 'ver', $version, $src );
		return esc_url( $src );

	}

}