wplibs / view
Simple template engine with twig support for WordPress
Installs: 1 296
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.0
Requires (Dev)
- mockery/mockery: ^0.9|^1.0
- phpunit/phpunit: 4.8.*|5.7.*
- twig/twig: ^1.0
This package is auto-updated.
Last update: 2024-11-21 20:38:27 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']);