-
Notifications
You must be signed in to change notification settings - Fork 10
/
functions.php
55 lines (49 loc) · 2.01 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
<?php
/**
* Functions and definitions
*
* @package cpschool
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$cpschool_includes = array(
'theme-settings' => '/theme-settings.php',
'setup' => '/setup.php',
'hooks-custom' => '/hooks-custom.php',
'integrations' => '/plugins/integrations.php',
'plugin-update-checker' => '/plugins/plugin-update-checker/plugin-update-checker.php',
'calendar-plus' => '/plugins/calendar-plus.php',
'advanced-custom-fields-setup' => '/plugins/advanced-custom-fields-setup.php',
'kirki' => '/plugins/kirki/kirki.php',
'wp-menu-icons' => '/plugins/menu-icons/wp-menu-icons.php',
'breadcrumbs' => '/plugins/breadcrumbs.php',
'cp-directory-setup' => '/plugins/cp-directory-setup.php',
'widgets' => '/widgets.php',
'enqueue' => '/enqueue.php',
'template-tags' => '/template-tags.php',
'hooks-wp' => '/hooks-wp.php',
'customizer' => '/customizer.php',
'comments' => '/comments.php',
'wp-bootstrap-navwalker' => '/class-wp-bootstrap-navwalker.php',
'editor' => '/editor.php',
);
$cpschool_includes = apply_filters( 'cpschool_includes', $cpschool_includes );
if ( $cpschool_includes ) {
foreach ( $cpschool_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;
}
}
// Handles updating theme from GitHub.
if ( class_exists( 'Puc_v4_Factory' ) ) {
$cpschool_update_checker = Puc_v4_Factory::buildUpdateChecker(
'https://github.com/campuspress/campuspress-flex',
__FILE__,
'campuspress-flex'
);
$cpschool_update_checker->getVcsApi()->enableReleaseAssets();
do_action( 'cpschool_update_checker_loaded', $cpschool_update_checker );
}