| Server IP : 213.132.222.41 / Your IP : 216.73.216.254 Web Server : Apache System : Linux plesk4.nlhosting.net 6.1.0-0.deb11.50-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1~deb11u1 (2026-07-02) x86_64 User : thecovenant ( 10927) PHP Version : 8.3.32 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/thecovenant.nl/httpdocs/wp-content/themes/neve/inc/views/ |
Upload File : |
<?php
/**
* Author: Andrei Baicus <andrei@themeisle.com>
* Created on: 17/08/2018
*
* @package Neve\Views
*/
namespace Neve\Views;
/**
* The base view class.
*
* @package Neve\Views
*/
abstract class Base_View {
/**
* Function that is run after instantiation.
*
* @return void
*/
abstract public function init();
/**
* Get view path to include.
*
* @param string $view_slug the view to be loaded from `views` folder, without extension.
* @param array $vars variables used in template.
*
* @return void
*/
public function get_view( $view_slug, $vars ) {
if ( empty( $view_slug ) ) {
return;
}
$args = apply_filters( 'neve_filter_view_data_' . $view_slug, $vars );
$rest_of_path = 'views/' . $view_slug . '.php';
$path = trailingslashit( get_stylesheet_directory() ) . $rest_of_path;
if ( is_file( $path ) ) {
include $path;
return;
}
$path = trailingslashit( get_template_directory() ) . $rest_of_path;
if ( is_file( $path ) ) {
include $path;
return;
}
}
}