-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
179 lines (145 loc) · 4.72 KB
/
functions.php
File metadata and controls
179 lines (145 loc) · 4.72 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?php
/**
* uncode functions and definitions
*
* @package uncode
*/
$ok_php = true;
if ( function_exists( 'phpversion' ) ) {
$php_version = phpversion();
if (version_compare($php_version,'5.3.0') < 0) $ok_php = false;
}
if (!$ok_php && !is_admin()) {
$title = esc_html__( 'PHP version obsolete','uncode' );
$html = '<h2>' . esc_html__( 'Ooops, obsolete PHP version' ,'uncode' ) . '</h2>';
$html .= '<p>' . sprintf( wp_kses( 'We have coded the Uncode theme to run with modern technology and we have decided not to support the PHP version 5.2.x just because we want to challenge our customer to adopt what\'s best for their interests.%sBy running obsolete version of PHP like 5.2 your server will be vulnerable to attacks since it\'s not longer supported and the last update was done the 06 January 2011.%sSo please ask your host to update to a newer PHP version for FREE.%sYou can also check for reference this post of WordPress.org <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>' ,'uncode', array('a' => 'href') ), '</p><p>', '</p><p>', '</p><p>') . '</p>';
wp_die( $html, $title, array('response' => 403) );
}
/**
* Load the main functions.
*/
require_once get_template_directory() . '/core/inc/main.php';
/**
* Load the admin functions.
*/
require_once get_template_directory() . '/core/inc/admin.php';
/**
* Load the uncode export file.
*/
require_once get_template_directory() . '/core/inc/export/uncode_export.php';
/**
* Font system.
*/
require_once get_template_directory() . '/core/font-system/font-system.php';
/**
* Load the color system.
*/
require_once get_template_directory() . '/core/inc/colors.php';
/**
* Required: set 'ot_theme_mode' filter to true.
*/
require_once get_template_directory() . '/core/theme-options/assets/theme-mode/functions.php';
/**
* Required: include OptionTree.
*/
load_template( get_template_directory() . '/core/theme-options/ot-loader.php' );
/**
* Load the theme options.
*/
require_once get_template_directory() . '/core/theme-options/assets/theme-mode/theme-options.php';
/**
* Load the main functions.
*/
require_once get_template_directory() . '/core/inc/performance.php';
/**
* Load the theme meta boxes.
*/
require_once get_template_directory() . '/core/theme-options/assets/theme-mode/meta-boxes.php';
/**
* Load TGM plugins activation.
*/
require_once get_template_directory() . '/core/plugins_activation/init.php';
/**
* Events Calendar
*/
require_once get_template_directory() . '/core/events-calendar/init.php';
/**
* Load the media enhanced function.
*/
require_once( ABSPATH . WPINC . '/class-oembed.php' );
require_once get_template_directory() . '/core/inc/media-enhanced.php';
/**
* Load the bootstrap navwalker.
*/
require_once get_template_directory() . '/core/inc/wp-bootstrap-navwalker.php';
/**
* Load the bootstrap navwalker.
*/
require_once get_template_directory() . '/core/inc/uncode-comment-walker.php';
/**
* Load the topbar navwalker.
*/
require_once get_template_directory() . '/core/inc/topbar-nav-walker.php';
/**
* Load menu builder.
*/
if ($ok_php) require_once get_template_directory() . '/partials/menus.php';
/**
* Load topbar builder.
*/
if ($ok_php) require_once get_template_directory() . '/partials/topbar.php';
/**
* Load header builder.
*/
if ($ok_php) require_once get_template_directory() . '/partials/headers.php';
/**
* Load elements partial.
*/
if ($ok_php) require_once get_template_directory() . '/partials/elements.php';
/**
* Custom template tags for this theme.
*/
require_once get_template_directory() . '/core/inc/template-tags.php';
/**
* Helpers functions.
*/
require_once get_template_directory() . '/core/inc/helpers.php';
/**
* Customizer additions.
*/
require_once get_template_directory() . '/core/inc/customizer.php';
/**
* Video
*/
require_once get_template_directory() . '/core/inc/video.php';
/**
* Club
*/
require_once get_template_directory() . '/core/inc/club.php';
/**
* Notification
*/
require_once get_template_directory() . '/core/inc/notification.php';
/**
* Customizer WooCommerce additions.
*/
if (class_exists( 'WooCommerce' )) {
require_once get_template_directory() . '/core/inc/customizer-woocommerce.php';
}
/**
* Load one click demo
*/
// require_once get_template_directory() . '/core/one-click-demo/init.php';
/**
* Load Jetpack compatibility file.
*/
require_once get_template_directory() . '/core/inc/jetpack.php';
if(!function_exists('wpml_get_object_id')){
function wpml_get_object_id($element_id, $element_type='post', $return_original_if_missing=false, $ulanguage_code=null){
if(function_exists('icl_object_id')){
return icl_object_id($element_id, $element_type, $return_original_if_missing, $ulanguage_code);
}else{
return $element_id;
}
}
}