|
@@ -53,6 +53,12 @@ class View
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if ($type == 'wp') {
|
|
|
+ $temp = explode('.', $dest);
|
|
|
+ $dest = $temp[0] . '.webp';
|
|
|
+ $file = str_replace($root, $host, $dest);
|
|
|
+ }
|
|
|
+
|
|
|
if (!strstr($dest, 'http://') && !is_file($dest)) {
|
|
|
$handle = new Handle();
|
|
|
$method = 'handle_' . $type;
|
|
@@ -74,18 +80,18 @@ class View
|
|
|
{
|
|
|
$type = $id = false;
|
|
|
|
|
|
- if (strstr($file, '_c')) {
|
|
|
+ if (strstr($file, '_wp')) {
|
|
|
+ $array = explode('_wp', $file);
|
|
|
+ $type = 'wp';
|
|
|
+ } elseif (strstr($file, '_p')) {
|
|
|
+ $array = explode('_p', $file);
|
|
|
+ $type = 'p';
|
|
|
+ } elseif (strstr($file, '_c')) {
|
|
|
$array = explode('_c', $file);
|
|
|
$type = 'c';
|
|
|
} elseif (strstr($file, '_t')) {
|
|
|
$array = explode('_t', $file);
|
|
|
$type = 't';
|
|
|
- } elseif (strstr($file, '_p')) {
|
|
|
- $array = explode('_p', $file);
|
|
|
- $type = 'p';
|
|
|
- } elseif (strstr($file, '_wp')) {
|
|
|
- $array = explode('_wp', $file);
|
|
|
- $type = 'wp';
|
|
|
}
|
|
|
|
|
|
if (isset($array)) {
|