Skip to content

Instantly share code, notes, and snippets.

@banderon
Created April 10, 2015 14:23
Show Gist options
  • Save banderon/bc5f76e4666289cbf2ce to your computer and use it in GitHub Desktop.
Save banderon/bc5f76e4666289cbf2ce to your computer and use it in GitHub Desktop.
<?php
$build_time = filemtime( get_stylesheet_directory() . '/style.css' );
function set_enqueue_ver( $data ) use ( $build_time ) {
$data->default_version = $build_time;
}
add_action( 'wp_default_scripts', 'set_enqueue_ver' );
add_action( 'wp_default_styles', 'set_enqueue_ver' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment