2014-12-10 11:36:38 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2016-11-21 18:47:05 +00:00
|
|
|
* Understrap functions and definitions
|
2014-12-10 11:36:38 +00:00
|
|
|
*
|
|
|
|
* @package understrap
|
|
|
|
*/
|
|
|
|
|
2018-09-10 21:59:04 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit; // Exit if accessed directly.
|
|
|
|
}
|
|
|
|
|
2018-09-12 11:27:29 +00:00
|
|
|
$understrap_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.
|
|
|
|
'/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.
|
|
|
|
'/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.
|
|
|
|
);
|
|
|
|
|
|
|
|
foreach ( $understrap_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;
|
|
|
|
}
|