This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_load_meta() { | |
$script = '/js/script.js'; | |
wp_enqueue_script( 'my-tools', get_template_directory_uri().$script, null, my_version_hash($script) ); | |
$stylesheet = '/style.css'; | |
wp_enqueue_style( 'my-style', get_template_directory_uri().$stylesheet, null, my_version_hash($stylesheet) ); | |
} | |
add_action('wp_enqueue_scripts', 'my_load_meta'); | |
// Create a hash of the file and pass it back for caching purposes | |
function my_version_hash($file) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |