It would be useful if tailor could expose the $args parameter in tailor_partial, so that users can hook in alternative template engines. Currently $partial, $slug, $name are passed, but exposing the arguments which are passed to the template is also needed to avoid having to create delegating PHP partials.
It would be useful if tailor could expose the
$args
parameter intailor_partial
, so that users can hook in alternative template engines. Currently$partial
,$slug
,$name
are passed, but exposing the arguments which are passed to the template is also needed to avoid having to create delegating PHP partials.As an example, WooCommerce does this in
wc_get_template
.In my case I'd like to render the templates through Twig/Timber. People using Sage and Blade would probably find it useful as well.
Open PR: #117
Example use case
A hook that would allow for twig partials using Timber, in this case overriding
loop-list.php
withtailor/loop--list.twig