Created
January 16, 2012 15:51
-
-
Save smajda/1621475 to your computer and use it in GitHub Desktop.
Add theme version option for bwp minify's cache buster
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
From 46e9890ead9e23600df5d081e78817e2889eddf2 Mon Sep 17 00:00:00 2001 | |
From: Jon Smajda <jon@smajda.com> | |
Date: Mon, 16 Jan 2012 09:36:32 -0600 | |
Subject: [PATCH] Add theme version as option for bwp-minify | |
--- | |
.../bwp-minify/includes/class-bwp-minify.php | 8 +++++++- | |
1 files changed, 7 insertions(+), 1 deletions(-) | |
diff --git a/wp-content/plugins/bwp-minify/includes/class-bwp-minify.php b/wp-content/plugins/bwp-minify/includes/class-bwp-minify.php | |
index 276b0ce..1385940 100644 | |
--- a/wp-content/plugins/bwp-minify/includes/class-bwp-minify.php | |
+++ b/wp-content/plugins/bwp-minify/includes/class-bwp-minify.php | |
@@ -242,6 +242,7 @@ if (!empty($page)) | |
__('Do not append anything', 'bwp-minify') => 'none', | |
__('Cache folder’s last modified time', 'bwp-minify') => 'mtime', | |
__('Your WordPress’s current version', 'bwp-minify') => 'wpver', | |
+ __('Your theme’s current version', 'bwp-minify') => 'tver', | |
__('A custom number', 'bwp-minify') => 'custom' | |
) | |
), | |
@@ -409,6 +410,11 @@ if (!empty($page)) | |
return $this->ver; | |
break; | |
+ case 'tver': | |
+ if ($theme = get_theme_data(TEMPLATEPATH.'/style.css')) | |
+ return $theme['Version']; | |
+ break; | |
+ | |
case 'custom': | |
return $this->options['input_custom_buster']; | |
break; | |
-- | |
1.7.0.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment