PHP code example of jeffreyvanrossum / wp-views
1. Go to this page and download the library: Download jeffreyvanrossum/wp-views library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jeffreyvanrossum / wp-views example snippets
function your_prefix_view(...$args)
{
return new WPViews('your-view-path')->render(...$args);
}
your_prefix_view('your-view', ['foo' => 'bar']);