Version Description
- Minor bug fixes (pass-by-reference)
Download this release
Release Info
| Developer | keycdn |
| Plugin | |
| Version | 1.0.7 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.6 to 1.0.7
- cdn-enabler.php +1 -1
- inc/cdn_enabler_rewriter.class.php +4 -4
- readme.txt +7 -0
cdn-enabler.php
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
Author: KeyCDN
|
| 7 |
Author URI: https://www.keycdn.com
|
| 8 |
License: GPLv2 or later
|
| 9 |
-
Version: 1.0.
|
| 10 |
*/
|
| 11 |
|
| 12 |
/*
|
| 6 |
Author: KeyCDN
|
| 7 |
Author URI: https://www.keycdn.com
|
| 8 |
License: GPLv2 or later
|
| 9 |
+
Version: 1.0.7
|
| 10 |
*/
|
| 11 |
|
| 12 |
/*
|
inc/cdn_enabler_rewriter.class.php
CHANGED
|
@@ -85,13 +85,13 @@ class CDN_Enabler_Rewriter
|
|
| 85 |
* rewrite url
|
| 86 |
*
|
| 87 |
* @since 0.0.1
|
| 88 |
-
* @change 1.0.
|
| 89 |
*
|
| 90 |
* @param string $asset current asset
|
| 91 |
* @return string updated url if not excluded
|
| 92 |
*/
|
| 93 |
|
| 94 |
-
protected function rewrite_url(
|
| 95 |
if ($this->exclude_asset($asset[0])) {
|
| 96 |
return $asset[0];
|
| 97 |
}
|
|
@@ -155,7 +155,7 @@ class CDN_Enabler_Rewriter
|
|
| 155 |
* rewrite url
|
| 156 |
*
|
| 157 |
* @since 0.0.1
|
| 158 |
-
* @change 1.0.
|
| 159 |
*
|
| 160 |
* @param string $html current raw HTML doc
|
| 161 |
* @return string updated HTML doc with CDN links
|
|
@@ -187,7 +187,7 @@ class CDN_Enabler_Rewriter
|
|
| 187 |
$regex_rule .= '/(?:((?:'.$dirs.')[^\"\')]+)|([^/\"\']+\.[^/\"\')]+))(?=[\"\')])#';
|
| 188 |
|
| 189 |
// call the cdn rewriter callback
|
| 190 |
-
$cdn_html = preg_replace_callback($regex_rule, [
|
| 191 |
|
| 192 |
return $cdn_html;
|
| 193 |
}
|
| 85 |
* rewrite url
|
| 86 |
*
|
| 87 |
* @since 0.0.1
|
| 88 |
+
* @change 1.0.7
|
| 89 |
*
|
| 90 |
* @param string $asset current asset
|
| 91 |
* @return string updated url if not excluded
|
| 92 |
*/
|
| 93 |
|
| 94 |
+
protected function rewrite_url(&$asset) {
|
| 95 |
if ($this->exclude_asset($asset[0])) {
|
| 96 |
return $asset[0];
|
| 97 |
}
|
| 155 |
* rewrite url
|
| 156 |
*
|
| 157 |
* @since 0.0.1
|
| 158 |
+
* @change 1.0.7
|
| 159 |
*
|
| 160 |
* @param string $html current raw HTML doc
|
| 161 |
* @return string updated HTML doc with CDN links
|
| 187 |
$regex_rule .= '/(?:((?:'.$dirs.')[^\"\')]+)|([^/\"\']+\.[^/\"\')]+))(?=[\"\')])#';
|
| 188 |
|
| 189 |
// call the cdn rewriter callback
|
| 190 |
+
$cdn_html = preg_replace_callback($regex_rule, [$this, 'rewrite_url'], $html);
|
| 191 |
|
| 192 |
return $cdn_html;
|
| 193 |
}
|
readme.txt
CHANGED
|
@@ -47,6 +47,13 @@ The CDN Enabler plugin has been developed to link your content to the CDN URLs.
|
|
| 47 |
|
| 48 |
== Changelog ==
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
= 1.0.5 =
|
| 51 |
* Multiprotocol CDN rewriting
|
| 52 |
* Add purging through KeyCDN API
|
| 47 |
|
| 48 |
== Changelog ==
|
| 49 |
|
| 50 |
+
= 1.0.7 =
|
| 51 |
+
* Minor bug fixes (pass-by-reference)
|
| 52 |
+
|
| 53 |
+
= 1.0.6 =
|
| 54 |
+
* Minor bug fixes
|
| 55 |
+
* Improved CDN purging
|
| 56 |
+
|
| 57 |
= 1.0.5 =
|
| 58 |
* Multiprotocol CDN rewriting
|
| 59 |
* Add purging through KeyCDN API
|
