NewCity Timber Extensions
Wordpress plugin containing Timber settings and class extensions
by NewCity · github.com/newcity/newcity-timber-extensions · website
★ 1stars
2.8kcomposer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/newcity/newcity-timber-extensions/archive/refs/heads/master.zipAlso on Packagist as newcity/newcity-timber-extensions:
composer require newcity/newcity-timber-extensionsFrom the readme
NewCity Timber Extensions
This Wordpress plugin pre-sets some common configuration options for Timber and Twig. It also
creates a new post class, NCTimberPost, that extends the default TimberPost class with
commonly-needed functions and properties. When writing new TimberPost classes, you should extend
NCTimberPost instead of the default TimberPost class.
Settings
Enables Timber caching and moves the cache directory to wp-content/uploads/timber-cache (required on Pantheon for filesystem write-access)
Expands the locations that Timber will seek Twig templates and partials. Any .twig file placed inside either the /templates or /partials directory will be detected, no matter how many directories deep it may be.
Filters
|quoteswap( $mode[optional] )
Changes all curly double-quotes to curly single quotes. Useful for nesting quotes.
You can also pass a $mode argument of stod to change single quotes to double. This is not usually
adviseable, since the filter doesn't currently know the different between single quotes and apostrophes.
|printr
Mimics the PHP printr function, returning a formatted array or object wrapped in a tag for easier reading.
NCTimberPo
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| v0.3.5 | Nov 30, 2018 |
| v0.3.4 | Nov 30, 2018 |
| v0.3.3 | Nov 1, 2018 |
| v0.3.2 | Aug 23, 2018 |
| v0.3.1 | Jun 7, 2018 |
| v0.3.0 | Jun 7, 2018 |
| v0.2.6 | Nov 30, 2017 |
| v0.2.5-rev | Nov 27, 2017 |
| v0.2.4 | Nov 22, 2017 |
| v0.2.3 | Nov 10, 2017 |
| v0.2.2 | Nov 10, 2017 |
| v0.2.1 | Nov 10, 2017 |
| v0.2.0 | Nov 7, 2017 |
| v0.1.2 | Nov 7, 2017 |
| v0.1.1 | Nov 7, 2017 |
| v0.1.0 | Nov 7, 2017 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.