forked from rodrigo-gpereira/zero-theme-elementor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
51 lines (39 loc) · 977 Bytes
/
functions.php
File metadata and controls
51 lines (39 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Theme Functions
*
* @package Zero_Theme
*/
use ZT\Core\Classes\Theme;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
}
if ( ! defined( 'ZT_THEME_VERSION' ) ) {
define( 'ZT_THEME_VERSION', '1.0.1' );
}
if ( ! defined( 'ZT_THEME_FILE' ) ) {
define( 'ZT_THEME_FILE', __FILE__ );
}
if ( ! defined( 'ZT_THEME_PATH' ) ) {
define( 'ZT_THEME_PATH', untrailingslashit( get_template_directory() ) );
}
if ( ! defined( 'ZT_THEME_URI' ) ) {
define( 'ZT_THEME_URL', untrailingslashit( get_template_directory_uri() ) );
}
if ( ! defined( 'ZT_ELEMENTOR_HIDE_HEADER_AND_FOOTER_ON_EDITOR' ) ) {
define( 'ZT_ELEMENTOR_HIDE_HEADER_AND_FOOTER_ON_EDITOR', false );
}
if ( ! class_exists( 'Theme', false ) ) {
/**
* Initializes the theme.
*
* @return object Theme
*/
function zt_init_theme(): object {
return Theme::get_instance();
}
zt_init_theme();
}