Property | Type | Description | |
---|---|---|---|
$auto_meta | |||
$autoescape | |||
$cache | |||
$context_cache | |||
$dirname | |||
$locations | |||
$twig_cache | |||
$version |
Method | Description | |
---|---|---|
__construct ( ) | ||
add_route ( string $route, callable $callback, array $args = [] ) | Add route. | |
compile ( array $filenames, array $data = [], boolean | integer $expires = false, string $cache_mode = Loader::CACHE_USE_DEFAULT, boolean $via_render = false ) : boolean | string | Compile function. | |
compile_string ( string $string, array $data = [] ) : boolean | string | Compile string. | |
fetch ( array $filenames, array $data = [], boolean $expires = false, string $cache_mode = Loader::CACHE_USE_DEFAULT ) : boolean | string | Fetch function. | |
get_context ( ) : array | Get context. | |
get_pagination ( array $prefs = [] ) : array | Get pagination. | |
get_post ( mixed $query = false, string | array $PostClass = 'Timber\Post' ) : array | boolean | null | Get post. | |
get_posts ( mixed $query = false, string | array $PostClass = 'Timber\Post', $return_collection = false ) : array | boolean | null | Get posts. | |
get_sidebar ( string $sidebar = 'sidebar.php', array $data = [] ) : boolean | string | Get sidebar. | |
get_sidebar_from_php ( string $sidebar = '', array $data ) : string | Get sidebar from PHP | |
get_sites ( array | boolean $blog_ids = false ) : array | Get sites. | |
get_term ( integer | WP_Term | object $term, string $taxonomy = 'post_tag', $TermClass = 'Timber\Term' ) : Timber\Term | WP_Error | null | Get term. | |
get_terms ( string | array $args = null, array $maybe_args = [], string $TermClass = 'Timber\Term' ) : mixed | Get terms. | |
get_widgets ( integer $widget_id ) : TimberFunctionWrapper | Get widgets. | |
init_constants ( ) | ||
query_post ( mixed $query = false, string $PostClass = 'Timber\Post' ) : array | boolean | null | Query post. | |
query_posts ( mixed $query = false, string $PostClass = 'Timber\Post' ) : |
Query posts. | |
render ( array $filenames, array $data = [], boolean | integer $expires = false, string $cache_mode = Loader::CACHE_USE_DEFAULT ) : boolean | string | Render function. | |
render_string ( string $string, array $data = [] ) : boolean | string | Render string. |
Method | Description | |
---|---|---|
init ( ) | ||
test_compatibility ( ) | Tests whether we can use Timber |
Method | Description | |
---|---|---|
backwards_compatibility ( ) |
public static compile ( array $filenames, array $data = [], boolean | integer $expires = false, string $cache_mode = Loader::CACHE_USE_DEFAULT, boolean $via_render = false ) : boolean | string | ||
$filenames | array | |
$data | array | |
$expires | boolean | integer | |
$cache_mode | string | |
$via_render | boolean | |
return | boolean | string |
public static get_pagination ( array $prefs = [] ) : array | ||
$prefs | array | |
return | array | mixed |
public static get_widgets ( integer $widget_id ) : TimberFunctionWrapper | ||
$widget_id | integer | |
return | TimberFunctionWrapper |
public static query_posts ( mixed $query = false, string $PostClass = 'Timber\Post' ) : |
||
$query | mixed | |
$PostClass | string | |
return |
protected test_compatibility ( ) |