Jetpack::load_view PHP Method

load_view() public method

Data passed in with the $data parameter will be available in the template file as $data['value']
public load_view ( string $template, array $data = [] ) : boolean
$template string - Template file to load
$data array - Any data to pass along to the template
return boolean - If template file was found
    public function load_view($template, $data = array())
    {
        $views_dir = JETPACK__PLUGIN_DIR . 'views/';
        if (file_exists($views_dir . $template)) {
            require_once $views_dir . $template;
            return true;
        }
        error_log("Jetpack: Unable to find view file {$views_dir}{$template}");
        return false;
    }
Jetpack