-
Notifications
You must be signed in to change notification settings - Fork 2
/
functions.php
41 lines (33 loc) · 1.51 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
<?php
/**
* Theme functions file.
*
* This file is used to bootstrap the theme.
*
* @package Taproot
* @author Sky Shabatura <theme@sky.camp>
* @copyright 2021 Sky Shabatura
* @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later
* @link https://taproot-theme.com
*/
# ------------------------------------------------------------------------------
# Compatibility check for WP and PHP.
# ------------------------------------------------------------------------------
if ( version_compare( $GLOBALS['wp_version'], '5.4.0', '<' ) || version_compare( PHP_VERSION, '7.0', '<' ) ) {
require_once( get_parent_theme_file_path( 'compat.php' ) );
return;
}
# ------------------------------------------------------------------------------
# Run the Composer autoloader.
# ------------------------------------------------------------------------------
if ( file_exists( get_parent_theme_file_path( 'vendor/autoload.php' ) ) ) {
require_once( get_parent_theme_file_path( 'vendor/autoload.php' ) );
}
# ------------------------------------------------------------------------------
# Load theme tools.
# ------------------------------------------------------------------------------
require_once( get_parent_theme_file_path( 'app/Tools/functions-tools.php' ) );
# ------------------------------------------------------------------------------
# Run the theme.
# ------------------------------------------------------------------------------
require_once( get_parent_theme_file_path( 'app/app.php' ) );