Skip to content

wplibs/view

Repository files navigation

View

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']);

About

Simple template engine with twig support for WordPress

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published