Skip to content

Hotfix for Timber::get_posts behavior

Compare
Choose a tag to compare
@jarednova jarednova released this 30 May 18:23

Fixes and improvements

  • Updated to most current version of Twig.
  • This restores the prior behavior before #1813 / 1.9.3 when using Timber::get_posts(). This is now controllable by devs.
  • Add support for non-cookied comment awaiting moderation message #1954 (thanks @codeclarified).
  • Avoids a potential WSOD when incorrectly specifying template filenames #1984 (thanks @aj-adl).

Changes for Theme Developers

  • If you run into problems with unknown Twig_SimpleFilter or unknown Twig_Filter classes, you can use Timber\Twig_Filter instead #1963.
  • You can use WordPress's behavior of get_posts() (versus WP_Query) via a filter. By default, Timber uses the behaviors of WP_Query in Timber’s queries #1989 (thanks @palmiak).
// Turn on WordPress’s behavior of get_posts when using Timber::get_posts()
add_filter( 'timber/get_posts/mirror_wp_get_posts', '__return_true' );