wplibs/view

Simple template engine with twig support for WordPress

Maintainers

Details

github.com/wplibs/view

Source

Issues

Installs: 1 296

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/wplibs/view

dev-master 2018-11-20 17:19 UTC

This package is auto-updated.

Last update: 2025-09-21 22:40:29 UTC


README

Installation

composer require wplibs/view

Usage

<?php

use WPLibs\View\Factory;

$view_factory = Factory::create([
    'paths' => [
        get_stylesheet_directory() . '/custom-templates',
        get_template_directory() . '/custom-templates',
        '/path-to-plugin-dir/templates',
    ]
]);

echo $view_factory->make('welcome.php', ['data' => 'value']);