PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.0.7
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.0.7
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
templately / includes / Utils / Views.php

Views.php in Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! 3.0.7, at includes/Utils/Views.php

30 lines 535 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Templately\Utils;
4
5 class Views extends Base {
6
7 protected $dir = '';
8
9 public function __construct( $path ) {
10 $this->dir = trailingslashit($path);
11 }
12
13 public function get( string $template, array $args = [] ) {
14 extract( $args );
15
16 include $this->get_path( $template );
17 }
18
19 public function get_path( $template ): string {
20 return $this->dir . $template . '.php';
21 }
22
23 public function get_header() {
24 $this->get( 'templates/header' );
25 }
26
27 public function get_footer() {
28 $this->get( 'templates/footer' );
29 }
30 }