diff --git a/functions.php b/functions.php index bceeb72..81d49a7 100644 --- a/functions.php +++ b/functions.php @@ -753,4 +753,27 @@ $hash_link.\n\n add_action('wpcf7_mail_sent', 'my_custom_mail_sent' ); +/** + * + */ + + if (!function_exists('view')){ + function view ($view, $data = array(), $layer = null){ + + ob_start(); + + if (is_array($data)) + extract($data); + if ($layer !== null){ + $content = view($view, $data); + require $layer; + } + else + require $view; + + return trim(ob_get_clean()); + + } +} +