Timber - Version 0.20.1

Version Description

  • Hotfix to ensure non-exitent properties don't throw exception (thanks @kylehotchkiss)
Download this release

Release Info

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

Code changes from version 0.20.0 to 0.20.1

functions/timber-core.php CHANGED
@@ -37,6 +37,8 @@ abstract class TimberCore {
37
  $this->$field = $meta_value;
38
  } else if (method_exists($this, $field)){
39
  $this->$field = $this->$field();
 
 
40
  }
41
  }
42
  return $this->$field;
37
  $this->$field = $meta_value;
38
  } else if (method_exists($this, $field)){
39
  $this->$field = $this->$field();
40
+ } else {
41
+ $this->$field = false;
42
  }
43
  }
44
  return $this->$field;
functions/timber-helper.php CHANGED
@@ -571,58 +571,100 @@ class TimberHelper {
571
 
572
  /* LEGACY These have since been re-organized; but keeping linkages for backwards-compatibility */
573
 
 
 
 
574
  static function get_image_path( $iid ) {
575
  return TimberImageHelper::get_image_path( $iid );
576
  }
577
 
 
 
 
578
  static function get_current_url() {
579
  return TimberURLHelper::get_current_url();
580
  }
581
 
 
 
 
582
  static function is_url( $url ) {
583
  return TimberURLHelper::is_url( $url );
584
  }
585
 
 
 
 
586
  static function get_path_base() {
587
  return TimberURLHelper::get_path_base();
588
  }
589
 
 
 
 
590
  static function get_rel_url( $url, $force = false ) {
591
  return TimberURLHelper::get_rel_url( $url, $force );
592
  }
593
 
 
 
 
594
  static function is_local( $url ) {
595
  return TimberURLHelper::is_local( $url );
596
  }
597
 
 
 
 
598
  static function get_full_path( $src ) {
599
  return TimberURLHelper::get_full_path( $src );
600
  }
601
 
 
 
 
602
  static function get_rel_path( $src ) {
603
  return TimberURLHelper::get_rel_path( $src );
604
  }
605
 
 
 
 
606
  static function remove_double_slashes( $url ) {
607
  return TimberURLHelper::remove_double_slashes( $url );
608
  }
609
 
 
 
 
610
  static function prepend_to_url( $url, $path ) {
611
  return TimberURLHelper::prepend_to_url( $url, $path );
612
  }
613
 
 
 
 
614
  static function preslashit( $path ) {
615
  return TimberURLHelper::preslashit( $path );
616
  }
617
 
 
 
 
618
  static function is_external( $url ) {
619
  return TimberURLHelper::is_external( $url );
620
  }
621
 
 
 
 
622
  static function download_url( $url, $timeout = 300 ) {
623
  return TimberURLHelper::download_url( $url, $timeout );
624
  }
625
 
 
 
 
626
  static function get_params( $i = -1 ) {
627
  return TimberURLHelper::get_params( $i );
628
  }
571
 
572
  /* LEGACY These have since been re-organized; but keeping linkages for backwards-compatibility */
573
 
574
+ /**
575
+ * @deprecated
576
+ */
577
  static function get_image_path( $iid ) {
578
  return TimberImageHelper::get_image_path( $iid );
579
  }
580
 
581
+ /**
582
+ * @deprecated
583
+ */
584
  static function get_current_url() {
585
  return TimberURLHelper::get_current_url();
586
  }
587
 
588
+ /**
589
+ * @deprecated
590
+ */
591
  static function is_url( $url ) {
592
  return TimberURLHelper::is_url( $url );
593
  }
594
 
595
+ /**
596
+ * @deprecated
597
+ */
598
  static function get_path_base() {
599
  return TimberURLHelper::get_path_base();
600
  }
601
 
602
+ /**
603
+ * @deprecated
604
+ */
605
  static function get_rel_url( $url, $force = false ) {
606
  return TimberURLHelper::get_rel_url( $url, $force );
607
  }
608
 
609
+ /**
610
+ * @deprecated
611
+ */
612
  static function is_local( $url ) {
613
  return TimberURLHelper::is_local( $url );
614
  }
615
 
616
+ /**
617
+ * @deprecated
618
+ */
619
  static function get_full_path( $src ) {
620
  return TimberURLHelper::get_full_path( $src );
621
  }
622
 
623
+ /**
624
+ * @deprecated
625
+ */
626
  static function get_rel_path( $src ) {
627
  return TimberURLHelper::get_rel_path( $src );
628
  }
629
 
630
+ /**
631
+ * @deprecated
632
+ */
633
  static function remove_double_slashes( $url ) {
634
  return TimberURLHelper::remove_double_slashes( $url );
635
  }
636
 
637
+ /**
638
+ * @deprecated
639
+ */
640
  static function prepend_to_url( $url, $path ) {
641
  return TimberURLHelper::prepend_to_url( $url, $path );
642
  }
643
 
644
+ /**
645
+ * @deprecated
646
+ */
647
  static function preslashit( $path ) {
648
  return TimberURLHelper::preslashit( $path );
649
  }
650
 
651
+ /**
652
+ * @deprecated
653
+ */
654
  static function is_external( $url ) {
655
  return TimberURLHelper::is_external( $url );
656
  }
657
 
658
+ /**
659
+ * @deprecated
660
+ */
661
  static function download_url( $url, $timeout = 300 ) {
662
  return TimberURLHelper::download_url( $url, $timeout );
663
  }
664
 
665
+ /**
666
+ * @deprecated
667
+ */
668
  static function get_params( $i = -1 ) {
669
  return TimberURLHelper::get_params( $i );
670
  }
functions/timber-post.php CHANGED
@@ -698,7 +698,7 @@ class TimberPost extends TimberCore implements TimberCoreInterface {
698
  */
699
  function get_paged_content() {
700
  global $page;
701
- return $this->get_content(0,$page);
702
  }
703
  /**
704
  * @return mixed
698
  */
699
  function get_paged_content() {
700
  global $page;
701
+ return $this->get_content(0, $page);
702
  }
703
  /**
704
  * @return mixed
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: jarednova
3
  Tags: template engine, templates, twig
4
  Requires at least: 3.7
5
- Stable tag: 0.20.0
6
  Tested up to: 3.9.1
7
  PHP version: 5.3.0 or greater
8
  License: GPLv2 or later
@@ -41,6 +41,9 @@ Timber is great for any WordPress developer who cares about writing good, mainta
41
 
42
  == Changelog ==
43
 
 
 
 
44
  = 0.20.0 =
45
  * Iterators! You can now get data using query_posts which hooks into WP loop. Methods like get_the_title() now work (big thanks to @mgmartel)
46
  * Fixed img_to_jpg issue with alternate WP setups (@thetmkay)
2
  Contributors: jarednova
3
  Tags: template engine, templates, twig
4
  Requires at least: 3.7
5
+ Stable tag: 0.20.1
6
  Tested up to: 3.9.1
7
  PHP version: 5.3.0 or greater
8
  License: GPLv2 or later
41
 
42
  == Changelog ==
43
 
44
+ = 0.20.1 =
45
+ * Hotfix to ensure non-exitent properties don't throw exception (thanks @kylehotchkiss)
46
+
47
  = 0.20.0 =
48
  * Iterators! You can now get data using query_posts which hooks into WP loop. Methods like get_the_title() now work (big thanks to @mgmartel)
49
  * Fixed img_to_jpg issue with alternate WP setups (@thetmkay)
timber.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Timber
4
  Plugin URI: http://timber.upstatement.com
5
  Description: The WordPress Timber Library allows you to write themes using the power Twig templates
6
  Author: Jared Novack + Upstatement
7
- Version: 0.20.0
8
  Author URI: http://upstatement.com/
9
  */
10
 
4
  Plugin URI: http://timber.upstatement.com
5
  Description: The WordPress Timber Library allows you to write themes using the power Twig templates
6
  Author: Jared Novack + Upstatement
7
+ Version: 0.20.1
8
  Author URI: http://upstatement.com/
9
  */
10
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInite11ef494ebf2265b4e63668ffb2128bf::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInita784621e8158bb5d9dba8b8fc3bb9a00::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInite11ef494ebf2265b4e63668ffb2128bf
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInite11ef494ebf2265b4e63668ffb2128bf
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInite11ef494ebf2265b4e63668ffb2128bf', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInite11ef494ebf2265b4e63668ffb2128bf', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(__DIR__);
27
  $baseDir = dirname($vendorDir);
@@ -47,7 +47,7 @@ class ComposerAutoloaderInite11ef494ebf2265b4e63668ffb2128bf
47
  }
48
  }
49
 
50
- function composerRequiree11ef494ebf2265b4e63668ffb2128bf($file)
51
  {
52
  require $file;
53
  }
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInita784621e8158bb5d9dba8b8fc3bb9a00
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInita784621e8158bb5d9dba8b8fc3bb9a00', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInita784621e8158bb5d9dba8b8fc3bb9a00', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(__DIR__);
27
  $baseDir = dirname($vendorDir);
47
  }
48
  }
49
 
50
+ function composerRequirea784621e8158bb5d9dba8b8fc3bb9a00($file)
51
  {
52
  require $file;
53
  }