-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.php
More file actions
49 lines (42 loc) · 1.89 KB
/
functions.php
File metadata and controls
49 lines (42 loc) · 1.89 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
<?php
/**
* Ws functions and definitions
*
* @package Wsbase
*/
// Exit if accessed directly.
defined('ABSPATH') || exit;
// WsBase's includes directory.
$wsbase_inc_dir = 'inc';
// Array of files to include.
$wsbase_includes = array(
'/theme-settings.php', // Initialize theme default settings.
'/setup.php', // Theme setup and custom theme supports.
'/widgets.php', // Register widget area.
'/enqueue.php', // Enqueue scripts and styles.
'/template-tags.php', // Custom template tags for this theme.
'/pagination.php', // Custom pagination for this theme.
'/template_functions.php', // heme_functions.
'/template_hooks.php', // Custom hooks.
'/extras.php', // Custom functions that act independently of the theme templates.
'/customizer.php', // Customizer additions.
'/custom-comments.php', // Custom Comments file.
'/class-wp-bootstrap-navwalker.php', // Load custom WordPress nav walker. Trying to get deeper navigation? Check out: https://github.com/websweetstudio/wsbaseissues/567.
'/editor.php', // Load Editor functions.
'/block-editor.php', // Load Block Editor functions.
'/deprecated.php', // Load deprecated functions.
'/beaver-builder.php', // Load Beaver Builder functions.
'/updater.php',
);
// Load WooCommerce functions if WooCommerce is activated.
if (class_exists('WooCommerce')) {
$wsbase_includes[] = '/woocommerce.php';
}
// Load Jetpack compatibility file if Jetpack is activiated.
if (class_exists('Jetpack')) {
$wsbase_includes[] = '/jetpack.php';
}
// Include files.
foreach ($wsbase_includes as $file) {
require_once get_theme_file_path($wsbase_inc_dir . $file);
}