Closed mgiulio closed 7 years ago
Hey @mgiulio — thanks for the PR and sorry I'm only getting around to this now. In your opinion what issue or problem does this resolve? I want to make sure this is fixing or improving something (esp. b/c it's adding a new file) rather than simply a "different" way to do something
It's not a critical feature, but just a suggestion on how the Timber 'presence' test(that is, checking if the plugin is activated) could be done, especially when a front-end template is rendered.
In this way, whatever template would be rendered, if Timber is not installed/actived, the no-timber.php
file is rendered instead, without repeating the test in every template, but keeping this code segregated only in function.php
@mgiulio thanks for that info! You're totally right: this simplifies things so that the error appears on all page variations (single.php
, archive.php
...) without actually having to add code to each. I just changed the file organization and merged! Thanks so much!
@jarednova I am glad that you found it useful!
Prevents server errors on the front end without adding extra checks in php template files, but hijacking the requested template to a
no-timber.php
template.