improve view helper

This commit is contained in:
2025-07-17 18:42:35 +03:30
parent 59b9f35537
commit 3102ebf567
+2 -2
View File
@@ -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";
}
}