forked from Codeinwp/neve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.php
70 lines (63 loc) · 2.1 KB
/
start.php
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
<?php
/**
* Start file handles bootstrap.
*
* @package Neve
*/
/**
* Run theme functionality
*/
function neve_run() {
define(
'NEVE_COMPATIBILITY_FEATURES',
[
'single_customizer' => true,
'repeater_control' => true,
'malformed_div_on_shop' => true,
'custom_post_types_enh' => true,
'mega_menu' => true,
'scroll_to_top_icons' => true,
'palette_logo' => true,
'custom_icon' => true,
'link_control' => true,
'page_header_support' => true,
'featured_post' => true,
'php81_react_ctrls_fix' => true,
'gradient_picker' => true,
'custom_post_types_sidebar' => true,
'meta_custom_fields' => true,
'sparks' => true,
'advanced_search_component' => true,
'submenu_style' => true,
'blog_hover_effects' => true,
'hfg_d_search_iconbutton' => true, // Dynamic icon selection or a button for search components
]
);
$vendor_file = trailingslashit( get_template_directory() ) . 'vendor/autoload.php';
if ( is_readable( $vendor_file ) ) {
require_once $vendor_file;
}
require_once 'autoloader.php';
$autoloader = new \Neve\Autoloader();
$autoloader->add_namespace( 'Neve', get_template_directory() . '/inc/' );
if ( defined( 'NEVE_PRO_SPL_ROOT' ) ) {
$autoloader->add_namespace( 'Neve_Pro', NEVE_PRO_SPL_ROOT );
}
$autoloader->register();
if ( class_exists( '\\Neve\\Core\\Core_Loader' ) ) {
new \Neve\Core\Core_Loader();
}
if ( class_exists( '\\Neve_Pro\\Core\\Loader' ) ) {
/**
* Legacy code, compatibility with old pro version.
*/
if ( is_file( NEVE_PRO_SPL_ROOT . 'modules/header_footer_grid/components/Yoast_Breadcrumbs.php' ) ) {
require_once NEVE_PRO_SPL_ROOT . 'modules/header_footer_grid/components/Yoast_Breadcrumbs.php';
}
if ( is_file( NEVE_PRO_SPL_ROOT . 'modules/header_footer_grid/components/Language_Switcher.php' ) ) {
require_once NEVE_PRO_SPL_ROOT . 'modules/header_footer_grid/components/Language_Switcher.php';
}
\Neve_Pro\Core\Loader::instance();
}
}
neve_run();