Created
May 29, 2013 17:54
-
-
Save alexpos/5672283 to your computer and use it in GitHub Desktop.
Versioning WordPress style
This file contains hidden or 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
/** | |
* Enqueue scripts and styles | |
*/ | |
function version_id() { | |
if ( WP_DEBUG ) | |
return time(); | |
$my_theme = wp_get_theme(); | |
$thversion = $my_theme->Version; | |
return $thversion; | |
} | |
function stout_scripts() { | |
wp_register_style('style', get_template_directory_uri() . '/css/style.css', array(), version_id(), 'all'); | |
wp_enqueue_style('style'); | |
wp_enqueue_style('googlefonts','http://fonts.googleapis.com/css?family=Open+Sans:200,400,700,600',array(),'1','all'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment