summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-16 15:14:31 +0300
committerAndrew Dolgov <[email protected]>2010-11-16 15:14:31 +0300
commit0c425dc745fb1060cb610ad90cd3f0e379a6324d (patch)
tree51905ed8b9710af63857c73344135e2996c5d085 /functions.php
parentdd4c8697480a0df35b8f42b653a79c6d957df0d7 (diff)
force required theme version
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/functions.php b/functions.php
index 6b938f9c9..756cf2232 100644
--- a/functions.php
+++ b/functions.php
@@ -15,6 +15,8 @@
define('SUBSTRING_FOR_DATE', 'SUBSTRING');
}
+ define('THEME_VERSION_REQUIRED', 1.1);
+
/**
* Return available translations names.
*
@@ -2039,7 +2041,15 @@
$theme_path = '';
}
- return $theme_path;
+ if ($theme_path) {
+ if (is_file("$t/theme.ini")) {
+ $ini = parse_ini_file("$t/theme.ini", true);
+ if ($ini['theme']['version'] > THEME_VERSION_REQUIRED) {
+ return $theme_path;
+ }
+ }
+ }
+ return '';
}
function get_user_theme_options($link) {
@@ -2067,7 +2077,8 @@
foreach ($themes as $t) {
if (is_file("$t/theme.ini")) {
$ini = parse_ini_file("$t/theme.ini", true);
- if ($ini['theme']['version'] && !$ini['theme']['disabled']) {
+ if ($ini['theme']['version'] > THEME_VERSION_REQUIRED &&
+ !$ini['theme']['disabled']) {
$entry = array();
$entry["path"] = $t;
$entry["base"] = basename($t);