Version Description
- Fixed regression from S3 handling #1330 (@gchtr)
Download this release
Release Info
Developer | jarednova |
Plugin | Timber |
Version | 1.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.2.4
- lib/Image.php +3 -2
- lib/PostGetter.php +6 -2
- lib/Timber.php +1 -1
- readme.txt +5 -2
- timber.php +1 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +3 -3
lib/Image.php
CHANGED
@@ -436,12 +436,13 @@ class Image extends Post implements CoreInterface {
|
|
436 |
* ```
|
437 |
* @return bool|string
|
438 |
*/
|
439 |
-
public function src( $size = '' ) {
|
440 |
if ( isset($this->abs_url) ) {
|
441 |
return $this->_maybe_secure_url($this->abs_url);
|
442 |
}
|
443 |
|
444 |
-
$src = wp_get_attachment_image_src($this->ID, $size)
|
|
|
445 |
$src = apply_filters('timber/image/src', $src, $this->ID);
|
446 |
$src = apply_filters('timber_image_src', $src, $this->ID);
|
447 |
return $src;
|
436 |
* ```
|
437 |
* @return bool|string
|
438 |
*/
|
439 |
+
public function src( $size = 'full' ) {
|
440 |
if ( isset($this->abs_url) ) {
|
441 |
return $this->_maybe_secure_url($this->abs_url);
|
442 |
}
|
443 |
|
444 |
+
$src = wp_get_attachment_image_src($this->ID, $size);
|
445 |
+
$src = $src[0];
|
446 |
$src = apply_filters('timber/image/src', $src, $this->ID);
|
447 |
$src = apply_filters('timber_image_src', $src, $this->ID);
|
448 |
return $src;
|
lib/PostGetter.php
CHANGED
@@ -118,8 +118,12 @@ class PostGetter {
|
|
118 |
Helper::error_log('Unexpeted value for PostClass: '.print_r($post_class, true));
|
119 |
}
|
120 |
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
123 |
}
|
124 |
|
125 |
return $post_class_use;
|
118 |
Helper::error_log('Unexpeted value for PostClass: '.print_r($post_class, true));
|
119 |
}
|
120 |
|
121 |
+
$test_post = false;
|
122 |
+
if ( class_exists($post_class_use) ) {
|
123 |
+
$test_post = new $post_class_use();
|
124 |
+
}
|
125 |
+
if ( !$test_post || !(is_subclass_of($test_post, '\Timber\Post') || is_a($test_post, '\Timber\Post')) ) {
|
126 |
+
Helper::error_log('Class ' . $post_class_use . ' either does not exist or implement \Timber\Post');
|
127 |
}
|
128 |
|
129 |
return $post_class_use;
|
lib/Timber.php
CHANGED
@@ -35,7 +35,7 @@ use Timber\Loader;
|
|
35 |
*/
|
36 |
class Timber {
|
37 |
|
38 |
-
public static $version = '1.2.
|
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.2.4';
|
39 |
public static $locations;
|
40 |
public static $dirname = 'views';
|
41 |
public static $twig_cache = false;
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: jarednova, connorjburton, lggorman
|
3 |
Tags: template engine, templates, twig
|
4 |
Requires at least: 3.7
|
5 |
-
Stable tag: 1.2.
|
6 |
Tested up to: 4.7.2
|
7 |
PHP version: 5.3.0 or greater
|
8 |
License: GPLv2 or later
|
@@ -41,8 +41,11 @@ Timber is great for any WordPress developer who cares about writing good, mainta
|
|
41 |
|
42 |
== Changelog ==
|
43 |
|
|
|
|
|
|
|
44 |
= 1.2.3 =
|
45 |
-
* Fixed a
|
46 |
* Fixed handling of images stored on S3
|
47 |
|
48 |
= 1.2.2 =
|
2 |
Contributors: jarednova, connorjburton, lggorman
|
3 |
Tags: template engine, templates, twig
|
4 |
Requires at least: 3.7
|
5 |
+
Stable tag: 1.2.4
|
6 |
Tested up to: 4.7.2
|
7 |
PHP version: 5.3.0 or greater
|
8 |
License: GPLv2 or later
|
41 |
|
42 |
== Changelog ==
|
43 |
|
44 |
+
= 1.2.4 =
|
45 |
+
* Fixed regression from S3 handling #1330 (@gchtr)
|
46 |
+
|
47 |
= 1.2.3 =
|
48 |
+
* Fixed a potential XSS security issue
|
49 |
* Fixed handling of images stored on S3
|
50 |
|
51 |
= 1.2.2 =
|
timber.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Timber
|
|
4 |
Description: The WordPress Timber Library allows you to write themes using the power Twig templates.
|
5 |
Plugin URI: http://timber.upstatement.com
|
6 |
Author: Jared Novack + Upstatement
|
7 |
-
Version: 1.2.
|
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 Twig templates.
|
5 |
Plugin URI: http://timber.upstatement.com
|
6 |
Author: Jared Novack + Upstatement
|
7 |
+
Version: 1.2.4
|
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
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitf666168e7a491cc40ebebd55a28299b2::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit84cd2aa2b91dbce62f39c5742bc271e1
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitf666168e7a491cc40ebebd55a28299b2
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitf666168e7a491cc40ebebd55a28299b2', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitf666168e7a491cc40ebebd55a28299b2', 'loadClassLoader'));
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|