PHP Timber Namespace

Nested Namespaces

Timber\Cache
Timber\Integrations

Classes

Name Description
Admin
Core
FunctionWrapper
Helper As the name suggests these are helpers for Timber (and you!) when developing. You can find additional (mainly internally-focused helpers) in TimberURLHelper
ImageHelper Implements the Twig image filters: https://github.com/timber/timber/wiki/Image-cookbook#arbitrary-resizing-of-images - resize - retina - letterbox - tojpg
Integrations This is for integrating external plugins into timber
Loader
Menu In Timber, you can use TimberMenu() to make a standard Wordpress menu available to the Twig template as an object you can loop through. And once the menu becomes available to the context, you can get items from it in a way that is a little smoother and more versatile than Wordpress's wp_nav_menu. (You need never again rely on a crazy "Walker Function!"). The first thing to do is to initialize the menu using TimberMenu(). This will make the menu available as an object to work with in the context. (TimberMenu can include a Wordpress menu slug or ID, or it can be sent with no parameter--and guess the right menu.)
Pagination
Post This is the object you use to access or extend WordPress posts. Think of it as Timber's (more accessible) version of WP_Post. This is used throughout Timber to represent posts retrieved from WordPress making them available to Twig templates. See the PHP and Twig examples for an example of what it's like to work with this object in your code.
PostCollection PostCollections are internal objects used to hold a collection of posts
PostGetter
PostPreview An object that lets a user easily modify the post preview to their liking
PostQuery A PostQuery allows a user to query for a Collection of WordPress Posts.
PostsIterator
QueryIterator
Site TimberSite gives you access to information you need about your site. In Multisite setups, you can get info on other sites in your network.
Term Terms: WordPress has got 'em, you want 'em. Categories. Tags. Custom Taxonomies. You don't care, you're a fiend. Well let's get this under control
TermGetter
TextHelper Class provides different text-related functions commonly used in WordPress development
Timber Timber Class.
Twig
URLHelper
User This is used in Timber to represent users retrived from WordPress. You can call `$my_user = new Timber\User(123);` directly, or access it through the `{{ post.author }}` method.