Version Description
Download this release
Release Info
Developer | jarednova |
Plugin | Timber |
Version | 0.20.6 |
Comparing to | |
See all releases |
Code changes from version 0.20.5 to 0.20.6
- functions/timber-admin.php +8 -8
- functions/timber-menu.php +11 -9
- functions/timber-query-iterator.php +2 -1
- readme.txt +7 -1
- timber-starter-theme/author.php +1 -1
- timber.php +1 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
functions/timber-admin.php
CHANGED
@@ -3,10 +3,7 @@
|
|
3 |
class TimberAdmin {
|
4 |
|
5 |
function __construct() {
|
6 |
-
|
7 |
-
return;
|
8 |
-
}
|
9 |
-
add_filter( 'plugin_action_links', array( $this, 'settings_link' ), 10, 2 );
|
10 |
}
|
11 |
|
12 |
/**
|
@@ -16,11 +13,14 @@ class TimberAdmin {
|
|
16 |
* @param string $file
|
17 |
* @return array
|
18 |
*/
|
19 |
-
function
|
20 |
if ( strstr( $file, '/timber.php' ) ) {
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
24 |
}
|
25 |
return $links;
|
26 |
}
|
3 |
class TimberAdmin {
|
4 |
|
5 |
function __construct() {
|
6 |
+
add_filter( 'plugin_row_meta', array( $this, 'meta_links' ), 10, 2 );
|
|
|
|
|
|
|
7 |
}
|
8 |
|
9 |
/**
|
13 |
* @param string $file
|
14 |
* @return array
|
15 |
*/
|
16 |
+
function meta_links( $links, $file ) {
|
17 |
if ( strstr( $file, '/timber.php' ) ) {
|
18 |
+
unset($links[2]);
|
19 |
+
$links[] = '<a href="http://localhost/wp-admin/plugin-install.php?tab=plugin-information&plugin=timber-library&TB_iframe=true&width=600&height=550" class="thickbox" aria-label="More information about Timber" data-title="Timber">View details</a>';
|
20 |
+
$links[] = '<a href="http://upstatement.com/timber" target="_blank">Homepage</a>';
|
21 |
+
$links[] = '<a href="https://github.com/jarednova/timber/wiki" target="_blank">Documentation</a>';
|
22 |
+
$links[] = '<a href="https://github.com/jarednova/timber/wiki/getting-started" target="_blank">Starter Guide</a>';
|
23 |
+
return $links;
|
24 |
}
|
25 |
return $links;
|
26 |
}
|
functions/timber-menu.php
CHANGED
@@ -38,16 +38,18 @@ class TimberMenu extends TimberCore {
|
|
38 |
*/
|
39 |
private function init($menu_id) {
|
40 |
$menu = wp_get_nav_menu_items($menu_id);
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
-
$this->items = $menu;
|
46 |
-
$menu_info = wp_get_nav_menu_object($menu_id);
|
47 |
-
$this->import($menu_info);
|
48 |
-
$this->ID = $this->term_id;
|
49 |
-
$this->id = $this->term_id;
|
50 |
-
$this->title = $this->name;
|
51 |
}
|
52 |
|
53 |
/**
|
38 |
*/
|
39 |
private function init($menu_id) {
|
40 |
$menu = wp_get_nav_menu_items($menu_id);
|
41 |
+
if ($menu) {
|
42 |
+
_wp_menu_item_classes_by_context($menu);
|
43 |
+
if (is_array($menu)){
|
44 |
+
$menu = self::order_children($menu);
|
45 |
+
}
|
46 |
+
$this->items = $menu;
|
47 |
+
$menu_info = wp_get_nav_menu_object($menu_id);
|
48 |
+
$this->import($menu_info);
|
49 |
+
$this->ID = $this->term_id;
|
50 |
+
$this->id = $this->term_id;
|
51 |
+
$this->title = $this->name;
|
52 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
/**
|
functions/timber-query-iterator.php
CHANGED
@@ -131,7 +131,8 @@ class TimberQueryIterator implements Iterator {
|
|
131 |
|
132 |
//get_posts users numberposts
|
133 |
static function fix_number_posts_wp_quirk( $query ) {
|
134 |
-
if (isset($query->query) && isset($query->query['numberposts'])
|
|
|
135 |
$query->set( 'posts_per_page', $query->query['numberposts'] );
|
136 |
}
|
137 |
return $query;
|
131 |
|
132 |
//get_posts users numberposts
|
133 |
static function fix_number_posts_wp_quirk( $query ) {
|
134 |
+
if (isset($query->query) && isset($query->query['numberposts'])
|
135 |
+
&& !isset($query->query['posts_per_page'])) {
|
136 |
$query->set( 'posts_per_page', $query->query['numberposts'] );
|
137 |
}
|
138 |
return $query;
|
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.
|
6 |
Tested up to: 4.0
|
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.5 =
|
45 |
* Fixed issue with sticky posts being included when just feeding an array of ids
|
46 |
* Fix for pagination links with search terms (thanks @matthewsoares)
|
2 |
Contributors: jarednova
|
3 |
Tags: template engine, templates, twig
|
4 |
Requires at least: 3.7
|
5 |
+
Stable tag: 0.20.6
|
6 |
Tested up to: 4.0
|
7 |
PHP version: 5.3.0 or greater
|
8 |
License: GPLv2 or later
|
41 |
|
42 |
== Changelog ==
|
43 |
|
44 |
+
= 0.20.6
|
45 |
+
* Fixed some resulting bugs from numberposts vs. posts_per_page change as relates to galleries (thanks @IJMacD)
|
46 |
+
* Fixed issue with author.php in starter theme (thanks @dmtroyer)
|
47 |
+
* Added some sanity checks when menus are missing (thanks @jaredNova)
|
48 |
+
* New tests, yay!
|
49 |
+
|
50 |
= 0.20.5 =
|
51 |
* Fixed issue with sticky posts being included when just feeding an array of ids
|
52 |
* Fix for pagination links with search terms (thanks @matthewsoares)
|
timber-starter-theme/author.php
CHANGED
@@ -12,7 +12,7 @@ global $wp_query;
|
|
12 |
|
13 |
$data = Timber::get_context();
|
14 |
$data['posts'] = Timber::get_posts();
|
15 |
-
if (isset($query_vars['author'])){
|
16 |
$author = new TimberUser($wp_query->query_vars['author']);
|
17 |
$data['author'] = $author;
|
18 |
$data['title'] = 'Author Archives: ' . $author->name();
|
12 |
|
13 |
$data = Timber::get_context();
|
14 |
$data['posts'] = Timber::get_posts();
|
15 |
+
if (isset($wp_query->query_vars['author'])){
|
16 |
$author = new TimberUser($wp_query->query_vars['author']);
|
17 |
$data['author'] = $author;
|
18 |
$data['title'] = 'Author Archives: ' . $author->name();
|
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.
|
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.6
|
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
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit9e7b538325e8f0567809c5446a15052f::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 ComposerAutoloaderInitfe0e561295ef70bd3e25dfae10c709c9
|
|
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 |
$vendorDir = dirname(__DIR__);
|
27 |
$baseDir = dirname($vendorDir);
|
@@ -47,7 +47,7 @@ class ComposerAutoloaderInitfe0e561295ef70bd3e25dfae10c709c9
|
|
47 |
}
|
48 |
}
|
49 |
|
50 |
-
function
|
51 |
{
|
52 |
require $file;
|
53 |
}
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit9e7b538325e8f0567809c5446a15052f
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit9e7b538325e8f0567809c5446a15052f', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit9e7b538325e8f0567809c5446a15052f', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(__DIR__);
|
27 |
$baseDir = dirname($vendorDir);
|
47 |
}
|
48 |
}
|
49 |
|
50 |
+
function composerRequire9e7b538325e8f0567809c5446a15052f($file)
|
51 |
{
|
52 |
require $file;
|
53 |
}
|