Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.1 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.1 KB

Timber Sugar

Build Status Coverage Status

Some bonus functionality for Timber. Install it in wp-content/plugins and activate via the WordPress admin. Featuring...

dummy

Throw some dummy lorem ipsum where you need it...

<h1>Some title</h1>
<div class="body">
	{{dummy(500)|wpautop}}
</div>

... this outputs 500 words of random lorem ipsum.

Use it as a filter
<h1>{{post.title|dummy(15)}}</h1>

... this outputs 15 words of lorem ipsum if post.title is empty

twitterify

Take a string with @handles and #hashTags and make them links:

<div class="my-tweet">
{{tweet.content|twitterify}}
</div>

Outputs...

You should follow <a href="http://twitter.com/timberwp" target="_blank">@TimberWP</a>
if you love <a href="http://search.twitter.com/search?q=wordpress" target="_blank">#wordpress</a>