forked from Archie22is/ct-bones
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
114 lines (95 loc) · 3.83 KB
/
functions.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
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
<?php
/**
* CT Bones functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package CT_Bones
*/
define( 'CODETOT_DIR', get_template_directory() . '/codetot' );
define( 'CODETOT_ADMIN_DIR', get_template_directory() . '/codetot/admin' );
define( 'CODETOT_ADMIN_ASSETS_URI', get_template_directory_uri() . '/codetot/admin/assets' );
define( 'CODETOT_ASSETS_URI', get_template_directory_uri() . '/assets' );
require_once CODETOT_DIR . '/fallback.php';
require_once CODETOT_DIR . '/helpers/acf.php';
require_once CODETOT_DIR . '/helpers/metabox.php';
require_once CODETOT_DIR . '/helpers/generator.php';
require_once CODETOT_DIR . '/helpers/template-tags.php';
require_once CODETOT_DIR . '/helpers/utils.php';
/**
* Customizer Support
*/
require_once CODETOT_DIR . '/customizer/helpers.php';
require_once CODETOT_DIR . '/customizer/settings.php';
require_once CODETOT_DIR . '/customizer/pro-settings.php';
if ( class_exists( 'WooCommerce' ) ) {
require_once CODETOT_DIR . '/customizer/woocommerce-settings.php';
}
/**
* Block Editor support
*/
require_once CODETOT_DIR . '/gutenberg/init.php';
require_once CODETOT_DIR . '/theme-init.php';
require_once CODETOT_DIR . '/typography.php';
require_once CODETOT_DIR . '/assets.php';
require_once CODETOT_DIR . '/api.php';
require_once CODETOT_DIR . '/seo-support.php';
require_once CODETOT_DIR . '/features/related-posts.php';
require_once CODETOT_ADMIN_DIR . '/acf.php';
require_once CODETOT_ADMIN_DIR . '/ct-settings.php';
if ( defined( 'CT_THEME' ) ) :
require_once CODETOT_ADMIN_DIR . '/ct-theme.php';
endif;
require_once CODETOT_ADMIN_DIR . '/ct-data.php';
require_once CODETOT_ADMIN_DIR . '/page-settings.php';
require_once CODETOT_DIR . '/shortcodes.php';
/** Custom widgets */
require_once CODETOT_DIR . '/widgets/ct-icon-box.php';
require_once CODETOT_DIR . '/widgets/ct-company-info.php';
require_once CODETOT_DIR . '/widgets/ct-recent-posts.php';
require_once CODETOT_DIR . '/widgets/ct-related-posts.php';
require_once CODETOT_DIR . '/features/back-to-top.php';
require_once CODETOT_DIR . '/features/google-maps.php';
require_once CODETOT_DIR . '/features/mega-menu.php';
/**
* To enable fallback in child theme, please set in functions.php
* define('CT_THEME', true);
*/
if ( defined( 'CT_THEME' ) ) :
require_once CODETOT_DIR . '/woocommerce/ct-theme.php';
endif;
add_action(
'wp',
function() {
require_once CODETOT_DIR . '/layout.php';
require_once CODETOT_DIR . '/features/multiple-headers.php';
require_once CODETOT_DIR . '/features/breadcrumbs.php';
require_once CODETOT_DIR . '/features/facebook-comments.php';
},
10
);
if ( class_exists( 'WooCommerce' ) ) {
include_once CODETOT_DIR . '/helpers/woocommerce.php';
include_once CODETOT_DIR . '/woocommerce/template-tags.php';
require_once CODETOT_DIR . '/woocommerce/init.php';
require_once CODETOT_DIR . '/woocommerce/ct-settings.php';
require_once CODETOT_DIR . '/woocommerce/layouts/abstract.php';
require_once CODETOT_DIR . '/woocommerce/features/mini-cart.php';
require_once CODETOT_DIR . '/woocommerce/features/modal-login.php';
require_once CODETOT_DIR . '/woocommerce/features/quick-view.php';
require_once CODETOT_DIR . '/woocommerce/features/countdown-price.php';
require_once CODETOT_DIR . '/woocommerce/features/product-video.php';
require_once CODETOT_DIR . '/woocommerce/features/viewed-products.php';
require_once CODETOT_DIR . '/woocommerce/features/product-card-style.php';
require_once CODETOT_DIR . '/woocommerce/layouts/archive.php';
add_action(
'wp',
function() {
require_once CODETOT_DIR . '/woocommerce/layouts/product.php';
require_once CODETOT_DIR . '/woocommerce/layouts/account.php';
require_once CODETOT_DIR . '/woocommerce/layouts/cart.php';
require_once CODETOT_DIR . '/woocommerce/layouts/checkout.php';
}
);
}
require_once CODETOT_DIR . '/optimize.php';