) will now show you the products of post_class * Sanity checks for ACF (thanks @parisholley) * Fixed bug in TimberPost::prev and TimberPost::next that could return draft posts (thanks @slimndap) * Fixed bug with extra ellipsis in some previews (thanks @parisholley) = 0.16.2 = * Added has_term to TimberPost * Extra checks to make sure redirected links don't get 404 body class * Misc bugs = 0.16.1 = * Bug fix on ugly permalinks for pagination * Fixed issue where posts retrieved via an array of IDs was truncated at the default post count * Fixed issue where loading terms from multi taxonomies (thanks @WL-hohoho) * Added support for post_class on TimberPost (thanks @slimndap) * new `array` filter to convert single-values into array in twig * Cleaned-up and added translation support to `time_ago` filter (thanks @WL-hohoho) = 0.16.0 = * TimberTheme is now available in default context as .theme * Post meta now respects arrays (watch out for some possible compatiblity issues here) * Template loads now work for parent/child themes in Windows (thanks @matthewsoares) * Better method for removing 404 body class on manual redirects (thanks @mgmartel) = 0.15.5 = * Post formats: {{post.format}} ! = 0.15.4 = * More improvements to filters to support external integration with Pods and other WP frameworks * Fixed bug on date internationalization (thanks @slimndap) * Fixed bug on using existing image sizes (thanks @matthewsoares) * Fixed bug on homeurl vs siteurl (thanks @ciarand) * Added a cache lock to the TimberHelper::transient method * Added an in-development version of a TimberArchives object = 0.15.3 = * Upgrayedd to Twig 1.14.2 * Added composer integration * Bunch of new tests * Comments now support gravatrs (thanks @asecondwill) * Moved ACF integration into its own file. It now interacts via hooks instead of in-line * A few misc. bugs and extra sanity checks = 0.15.2 = * TimberImages now support alternate sizes = 0.15.1 = * Fix on revered prev/next post links = 0.15.0 = * Cacheing!!! * Cacheing!! * Cacheing!!!! Timber::render('mytemplate.twig', $data, $expires_time_in_secs); * Timber::render now automatically echos. Don't want it to? See below... * New Timber::compile method which _doesn't_ automatically echo. (Same args as Timber::render) * Added post.get_next / post.get_prev for TimberPosts * Fixed a thing to make get_preview easier when you want to omit the 'Read More' link * Read the [Full Release Notes](https://github.com/timber/timber/releases/tag/0.15.0) = 0.14.1 = * Added hooks to play nicely with Timber Debug Bar * Fixed-up Timber Term aliases, link, path, etc. * Add DB queries now get properly prepared * Supports custom author permalinks * Simplified TimberPost processing; shaved some processing time off = 0.14.0 = * More flexiblity for custom routes (thanks @mgmartel) * Added filters for core objects (TimberPost and TimberTerm). This greatly helps when you need to have retrived custom fields or repeaters interprted as posts or terms * Renamed "WPHelper" to more namespace-friendly "TimberHelper" * Added function_wrapper helper to execute functions where they are placed in the template as opposed to when they are generated (@mgmartel) * You can now have custom fields processed via post.get_field('my_custom_field'). This is a huge help for using things like Advanced Custom Fields' repeater. * Performance improvements = 0.13.5 = * Added comprehensive support for actions and filters (thanks @mgmartel) * Rewrote routing to template to be 100% harmonious with WordPress (thanks again @mgmartel) * Fix to some pagination errors when using a custom rewrite on a taxonomy (thanks to @kylehotchkiss) * Fixed issue with stripping the ellipses on a preview (thanks to @bryanscode) * Functions now work more logically, example: {{function('my_special_function', 'arg1')}} = 0.13.0 = * TimberMenuItems now get the WP classes you've come to know and love (.current-menu-item, etc.) * More test coverage for images * Resizing external images converts the URL into a md5 hash * Removed a dangerous backtrace that could overload errorlog * Some object caching on TimberPost->get_terms to improve performance = 0.12.2 = * TimberMenus now contain metadata 'bout the menu (thanks @bryanaka) * Fixed issue with Windows servers (thanks @kzykhys) * Resizing external images now incl. the full URL to avoid conflicts * Fixed pagination oddity * Some code cleanup stuff. = 0.12.1 = * A few fixes that catch issues with absolute vs. relative URLs in resize = 0.12.0 = * Pagination is re-factored to be more intuitive, and well, better. * Resize is also re-factored to respect absolute vs. relative URLs * Got rid of lots of old, bogus code. = 0.11.0 = * fixed load order of views so files inside of the child theme have priority over the parent theme. * comment ordering respects the default set in WordPress * added getting started screen * misc bug fixes * removed lots of old garbage, simplified file organization * contributors for this release: @ysurian, @thisislawatts, @punkshui and @paulwilde = 0.10.7 = * more normalization of menus, users * fixed bug in post.get_content (thanks @paulwilde) * fixed bug in way menu items with children got their children (thanks @EloB) = 0.10.6 = * more normalization of comments * Lots of cleanup of starter theme = 0.10.5 = * added theme URI to universal context = 0.10.4 = * Lots of code cleanup thanks to [Jakub](http://github.com/hsz) * Added new function for bloginfo * You can now hook into timber_context to filter the $context object * Added Timber::get_terms to retrieve lists of your blog's terms * Added better support for translation * Added filter for executing a function, ie {{'my_theme_function'|filter}} = 0.10.3 = * Corrected error with sidebar retrieval * language_attributes are now available as part of Timber::get_context(); payload. * Upgraded to Twig 1.13.1 = 0.10.2 = * added more aliases for easier coding (post.thumbnail instead of post.get_thumbnail, etc.) * Garbage removal = 0.10.1 = * load_template for routing can now accept a query argument * load_template will wait to load a template so that 'init' actions can fire. * way more inline documentation * print_a now includes the output of (most) methods in addition to properties. * added lots of aliases so that things like .author will work the same as .get_author == Screenshots == 1. This what a normal WordPress PHP file looks like 2. With Timber, you write Twig files that are super-clear and HTML-centric. == Installation == 1. Activate the plugin through the 'Plugins' menu in WordPress 2. For an example, try modifying your `home.php` or `index.php` with something like this: ` $context = array(); $context['message'] = 'Hello Timber!'; Timber::render( 'welcome.twig', $context ); ` Then create a subdirectory called `views` in your theme folder. Then create a file `views/welcome.twig` with these contents: ` {{ message }} ` When you visit this page, you'll see both the data from PHP come through as you've marked it up. For more, continue with the official [Getting Started Guide](https://timber.github.io/docs/getting-started/) == Support == Please post on [StackOverflow under the "Timber" tag](http://stackoverflow.com/questions/tagged/timber). Please use GitHub issues only for specific bugs, feature requests and other types of issues. == Frequently Asked Questions == = Can it be used in an existing theme? = You bet! Watch these **[Video Tutorials](https://timber.github.io/docs/getting-started/video-tutorials/)** to see how. = Is it used in production? = Tens of thousands of sites now use Timber. You can check some of them out in the **[Showcase](http://upstatement.com/timber/#showcase)**. = Doesn't this all make WordPress harder since there’s more to learn? = Does jQuery make JavaScript harder? Yes, it’s an extra piece to learn — but it super-charges your ability to write unencumbered JavaScript (and prevents you from having to learn lots of the messy internals). If your answer is "jQuery sucks and everyone should learn how to write vanilla JavaScript or they’re rotten stupid people," this tool isn’t for you. = Oh, Timber is simple code so it’s for making simple themes = Whatever. It simplifies the silly stuff so that you can focus on building more complicated sites and apps. jQuery simplifies Javascript, but you can still use the full range of JavaScript’s abilities. = Will you support it? = At [Upstatement](https://upstatement.com) we’re using it in dozens of sites (and many more planned) -- thousands of other developers are using it too. This isn’t going anywhere. Twig is the chosen language for other PHP platforms like Symfony, Drupal 8 and Craft.