This repository has been archived by the owner on Feb 23, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
} | ||
|
||
define('W3TC', true); | ||
define('W3TC_VERSION', '0.9.4.6'); | ||
define('W3TC_VERSION', '0.9.4.6.1'); | ||
define("W3TC_TESTED_ON_WP_VERSION", '4.7.1'); | ||
define('W3TC_POWERED_BY', 'W3 Total Cache/' . W3TC_VERSION); | ||
define('W3TC_EMAIL', '[email protected]'); | ||
|
@@ -121,6 +121,29 @@ function w3_microtime() { | |
return ((double) $usec + (double) $sec); | ||
} | ||
|
||
/** | ||
* Returns the W3TC current version (4 digit limit for config reading) | ||
* | ||
* @return string | ||
*/ | ||
function w3_current_version() | ||
{ | ||
static $ver = null; | ||
|
||
if ($ver === null) | ||
{ | ||
if (preg_match('/(\d+)\.(\d+)\.(\d+)\.(\d+)\.?(\d+)?/',W3TC_VERSION,$match)) { | ||
array_shift($match); | ||
if (count($match) == 5) array_pop($match); | ||
$ver = implode(".",$match); | ||
} | ||
else { | ||
$ver = W3TC_VERSION; | ||
} | ||
} | ||
return $ver; | ||
} | ||
|
||
/** | ||
* Check if content is HTML or XML | ||
* | ||
|
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
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
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