jarednova/timber — pull request #67 by mgmartel (2013-09-28 09:27:50+00:00)
Title: Set query in load_template on wp_loaded hook

First of all, thanks for the great work on this library! It is everything WP lacks and more.. makes developing with WP a whole lot more fun :+1:

The router is awesome, but if you call Timber::load_template in a plugin or functions.php directly (as per the docs), the query is also directly made. However, if you want to do something with a custom taxonomy, you can only start querying after the init hook (because that's where custom tax's should be registered).

This pull request fixes that by only actually querying just in time before loading the template.