Timber - Version 0.20.4

Version Description

  • Fixed issue with Timber::get_posts and Timber::query_posts using numberposts in args
Download this release

Release Info

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

Code changes from version 0.20.3 to 0.20.4

functions/timber-query-iterator.php CHANGED
@@ -14,7 +14,7 @@ class TimberQueryIterator implements Iterator {
14
  private $_posts_class = 'TimberPost';
15
 
16
  public function __construct( $query = false, $posts_class = 'TimberPost' ) {
17
-
18
  if ( $posts_class )
19
  $this->_posts_class = $posts_class;
20
 
@@ -124,4 +124,12 @@ class TimberQueryIterator implements Iterator {
124
  $this->_query->current_post;
125
  }
126
 
 
 
 
 
 
 
 
 
127
  }
14
  private $_posts_class = 'TimberPost';
15
 
16
  public function __construct( $query = false, $posts_class = 'TimberPost' ) {
17
+ add_action( 'pre_get_posts', array($this, 'fix_number_posts_wp_quirk' ));
18
  if ( $posts_class )
19
  $this->_posts_class = $posts_class;
20
 
124
  $this->_query->current_post;
125
  }
126
 
127
+ //get_posts users numberposts
128
+ static function fix_number_posts_wp_quirk( $query ) {
129
+ if (isset($query->query) && isset($query->query['numberposts'])) {
130
+ $query->set( 'posts_per_page', $query->query['numberposts'] );
131
+ }
132
+ return $query;
133
+ }
134
+
135
  }
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.3
6
  Tested up to: 3.9.1
7
  PHP version: 5.3.0 or greater
8
  License: GPLv2 or later
@@ -41,6 +41,12 @@ Timber is great for any WordPress developer who cares about writing good, mainta
41
 
42
  == Changelog ==
43
 
 
 
 
 
 
 
44
  = 0.20.2 =
45
  * Change default response code on load_view to be 200
46
  * Fixed error with relpath and subdomains (thanks @jnweaver)
2
  Contributors: jarednova
3
  Tags: template engine, templates, twig
4
  Requires at least: 3.7
5
+ Stable tag: 0.20.4
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.4 =
45
+ * Fixed issue with Timber::get_posts and Timber::query_posts using numberposts in args
46
+
47
+ = 0.20.3 =
48
+ * Fixed some issues with linking to menu items with a hash
49
+
50
  = 0.20.2 =
51
  * Change default response code on load_view to be 200
52
  * Fixed error with relpath and subdomains (thanks @jnweaver)
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.3
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.4
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 ComposerAutoloaderInit1e4b722ec62306aebdca8ad5ad1beeb2::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit4b58f8701289754e12436d4e4bc1df4c::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit1e4b722ec62306aebdca8ad5ad1beeb2
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit1e4b722ec62306aebdca8ad5ad1beeb2
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit1e4b722ec62306aebdca8ad5ad1beeb2', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit1e4b722ec62306aebdca8ad5ad1beeb2', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(__DIR__);
27
  $baseDir = dirname($vendorDir);
@@ -47,7 +47,7 @@ class ComposerAutoloaderInit1e4b722ec62306aebdca8ad5ad1beeb2
47
  }
48
  }
49
 
50
- function composerRequire1e4b722ec62306aebdca8ad5ad1beeb2($file)
51
  {
52
  require $file;
53
  }
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit4b58f8701289754e12436d4e4bc1df4c
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit4b58f8701289754e12436d4e4bc1df4c', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit4b58f8701289754e12436d4e4bc1df4c', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(__DIR__);
27
  $baseDir = dirname($vendorDir);
47
  }
48
  }
49
 
50
+ function composerRequire4b58f8701289754e12436d4e4bc1df4c($file)
51
  {
52
  require $file;
53
  }