-
Notifications
You must be signed in to change notification settings - Fork 2
/
functions.php
executable file
·44 lines (38 loc) · 1.67 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
<?php
namespace SkyRatpor\SkyCraft;
/**
* skycraft functions and definitions
*
* @package skycraft
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// Add composer autoloader
require_once("vendor/autoload.php");
$skycraft_includes = array(
'/theme-update-checker.php', // Initialize Theme updater
'/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.
'/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.
'/custom-header.php',
'/jetpack.php', // Load Jetpack compatibility file.
'/class-wp-bootstrap-navwalker.php', // Load custom WordPress nav walker.
'/woocommerce.php', // Load WooCommerce functions.
'/editor.php', // Load Editor functions.
'/deprecated.php', // Load deprecated functions.
);
foreach ( $skycraft_includes as $file ) {
$filepath = locate_template( 'inc' . $file );
if ( ! $filepath ) {
trigger_error( sprintf( 'Error locating /inc%s for inclusion', $file ), E_USER_ERROR );
}
require_once $filepath;
}