File "helpers.php"

Full path: C:/Inetpub/vhosts/drshti.com/httpdocs/wp-content/plugins/depicter/modules/jeffreyvanrossum/wp-settings/helpers.php
File size: 556 B (556 B bytes)
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

<?php

namespace Depicter\Jeffreyvr\WPSettings;

use Depicter\Jeffreyvr\WPSettings\WPSettings;

if (! function_exists('view')) {
    function view($file, $variables = [])
    {
        foreach ($variables as $name => $value) {
            ${$name} = $value;
        }

        $full_path = __DIR__ . "/../resources/views/{$file}.php";

        if (! file_exists($full_path)) {
            return;
        }

        ob_start();

        include $full_path;

        echo apply_filters('wp_settings_render_view', ob_get_clean(), $file, $variables);
    }
}