Timber - Version 1.15.2

Version Description

Fixes and improvements * Fix error with S3 URLs and resize filters #2213 (thanks @hoangnd25)

Download this release

Release Info

Developer jarednova
Plugin Icon 128x128 Timber
Version 1.15.2
Comparing to
See all releases

Code changes from version 1.15.1 to 1.15.2

lib/Timber.php CHANGED
@@ -35,7 +35,7 @@ use Timber\Loader;
35
  */
36
  class Timber {
37
 
38
- public static $version = '1.15.1';
39
  public static $locations;
40
  public static $dirname = 'views';
41
  public static $twig_cache = false;
35
  */
36
  class Timber {
37
 
38
+ public static $version = '1.15.2';
39
  public static $locations;
40
  public static $dirname = 'views';
41
  public static $twig_cache = false;
lib/URLHelper.php CHANGED
@@ -207,11 +207,11 @@ class URLHelper {
207
  */
208
  public static function remove_double_slashes( $url ) {
209
  $url = str_replace('//', '/', $url);
210
- if ( strstr($url, 'http:') && !strstr($url, 'http://') ) {
211
- $url = str_replace('http:/', 'http://', $url);
212
- }
213
- if ( strstr($url, 'https:') && !strstr($url, 'https://') ) {
214
- $url = str_replace('https:/', 'https://', $url);
215
  }
216
  return $url;
217
  }
207
  */
208
  public static function remove_double_slashes( $url ) {
209
  $url = str_replace('//', '/', $url);
210
+ $schemes_whitelist = array( 'http', 'https', 's3' );
211
+ foreach ( $schemes_whitelist as $scheme ) {
212
+ if ( strstr($url, $scheme . ':') && !strstr($url, $scheme . '://') ) {
213
+ $url = str_replace( $scheme . ':/', $scheme . '://', $url );
214
+ }
215
  }
216
  return $url;
217
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: jarednova
3
  Tags: template engine, templates, twig
4
  Requires at least: 4.9.8
5
  Tested up to: 5.3.2
6
- Stable tag: 1.15.1
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -35,6 +35,9 @@ _Twig is the template language powering Timber; if you need a little background
35
 
36
  **Changes for Theme Developers**
37
 
 
 
 
38
 
39
  = 1.15.1 =
40
  **Fixes and improvements**
3
  Tags: template engine, templates, twig
4
  Requires at least: 4.9.8
5
  Tested up to: 5.3.2
6
+ Stable tag: 1.15.2
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
35
 
36
  **Changes for Theme Developers**
37
 
38
+ = 1.15.2 =
39
+ **Fixes and improvements**
40
+ * Fix error with S3 URLs and resize filters #2213 (thanks @hoangnd25)
41
 
42
  = 1.15.1 =
43
  **Fixes and improvements**
timber.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Timber
4
  Description: The WordPress Timber Library allows you to write themes using the power of Twig templates.
5
  Plugin URI: https://upstatement.com/timber
6
  Author: Jared Novack + Upstatement
7
- Version: 1.15.1
8
  Author URI: http://upstatement.com/
9
  */
10
  // we look for Composer files first in the plugins dir.
4
  Description: The WordPress Timber Library allows you to write themes using the power of Twig templates.
5
  Plugin URI: https://upstatement.com/timber
6
  Author: Jared Novack + Upstatement
7
+ Version: 1.15.2
8
  Author URI: http://upstatement.com/
9
  */
10
  // we look for Composer files first in the plugins dir.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitad727149e88eb2fc8fad43689551e91f::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitad727149e88eb2fc8fad43689551e91f
6
  {
7
  private static $loader;
8
 
@@ -13,21 +13,24 @@ class ComposerAutoloaderInitad727149e88eb2fc8fad43689551e91f
13
  }
14
  }
15
 
 
 
 
16
  public static function getLoader()
17
  {
18
  if (null !== self::$loader) {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitad727149e88eb2fc8fad43689551e91f', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitad727149e88eb2fc8fad43689551e91f', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitad727149e88eb2fc8fad43689551e91f::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +51,19 @@ class ComposerAutoloaderInitad727149e88eb2fc8fad43689551e91f
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitad727149e88eb2fc8fad43689551e91f::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequiread727149e88eb2fc8fad43689551e91f($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequiread727149e88eb2fc8fad43689551e91f($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef
6
  {
7
  private static $loader;
8
 
13
  }
14
  }
15
 
16
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
  public static function getLoader()
20
  {
21
  if (null !== self::$loader) {
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire840372b7c0b94b42cc1fe167280106ef($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire840372b7c0b94b42cc1fe167280106ef($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitad727149e88eb2fc8fad43689551e91f
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@@ -618,11 +618,11 @@ class ComposerStaticInitad727149e88eb2fc8fad43689551e91f
618
  public static function getInitializer(ClassLoader $loader)
619
  {
620
  return \Closure::bind(function () use ($loader) {
621
- $loader->prefixLengthsPsr4 = ComposerStaticInitad727149e88eb2fc8fad43689551e91f::$prefixLengthsPsr4;
622
- $loader->prefixDirsPsr4 = ComposerStaticInitad727149e88eb2fc8fad43689551e91f::$prefixDirsPsr4;
623
- $loader->fallbackDirsPsr4 = ComposerStaticInitad727149e88eb2fc8fad43689551e91f::$fallbackDirsPsr4;
624
- $loader->prefixesPsr0 = ComposerStaticInitad727149e88eb2fc8fad43689551e91f::$prefixesPsr0;
625
- $loader->classMap = ComposerStaticInitad727149e88eb2fc8fad43689551e91f::$classMap;
626
 
627
  }, null, ClassLoader::class);
628
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit840372b7c0b94b42cc1fe167280106ef
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
618
  public static function getInitializer(ClassLoader $loader)
619
  {
620
  return \Closure::bind(function () use ($loader) {
621
+ $loader->prefixLengthsPsr4 = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$prefixLengthsPsr4;
622
+ $loader->prefixDirsPsr4 = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$prefixDirsPsr4;
623
+ $loader->fallbackDirsPsr4 = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$fallbackDirsPsr4;
624
+ $loader->prefixesPsr0 = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$prefixesPsr0;
625
+ $loader->classMap = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$classMap;
626
 
627
  }, null, ClassLoader::class);
628
  }