forked from bootscore/bootscore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
67 lines (56 loc) · 2.46 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
<?php
/**
* Bootscore functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Bootscore
* @version 5.3.3
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
/**
* Load required files
*/
require_once('inc/theme-setup.php'); // Theme setup and custom theme supports
require_once('inc/breadcrumb.php'); // Breadcrumb
require_once('inc/columns.php'); // Main/sidebar column width and breakpoints
require_once('inc/comments.php'); // Comments
require_once('inc/container.php'); // Container class
require_once('inc/enable-html.php'); // Enable HTML in category and author description
require_once('inc/enqueue.php'); // Enqueue scripts and styles
require_once('inc/excerpt.php'); // Adds excerpt to pages
require_once('inc/hooks.php'); // Custom hooks
require_once('inc/loop.php'); // Amount of items in the loop before page gets paginated (set to 24)
require_once('inc/pagination.php'); // Pagination for loop and single posts
require_once('inc/password-protected-form.php'); // Form if post or page is protected by password
require_once('inc/template-tags.php'); // Meta information like author, date, comments, category and tags badges
require_once('inc/template-functions.php'); // Functions which enhance the theme by hooking into WordPress
require_once('inc/widgets.php'); // Register widget area and disables Gutenberg in widgets
require_once('inc/deprecated.php'); // Fallback functions being dropped in v6
/**
* Load WooCommerce scripts if plugin is activated
*/
if (class_exists('WooCommerce')) {
require get_template_directory() . '/woocommerce/wc-functions.php';
}
/**
* Load Bootstrap 5 Nav Walker and registers menus
* Remove this snippet in v6 and add nav-walker to the enqueue list
* https://github.com/orgs/bootscore/discussions/347
*/
if (!function_exists('register_navwalker')) :
function register_navwalker() {
require_once('inc/class-bootstrap-5-navwalker.php');
// Register Menus
register_nav_menu('main-menu', 'Main menu');
register_nav_menu('footer-menu', 'Footer menu');
}
endif;
add_action('after_setup_theme', 'register_navwalker');
/**
* Load Jetpack compatibility file
*/
if (defined('JETPACK__VERSION')) {
require get_template_directory() . '/inc/jetpack.php';
}