improve view helper
This commit is contained in:
+2
-2
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('view')) {
|
||||
function view(string $view): string
|
||||
function view(string $view)
|
||||
{
|
||||
$basedir = plugin_dir_path(__FILE__);
|
||||
return file_get_contents("{$basedir}resources/views/$view.php");
|
||||
include "{$basedir}resources/views/$view.php";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user