Skip to content

Instantly share code, notes, and snippets.

@mavieth
Last active September 5, 2016 16:33
Show Gist options
  • Select an option

  • Save mavieth/cecf26ea2cbcca152bc0a9e322aa1b93 to your computer and use it in GitHub Desktop.

Select an option

Save mavieth/cecf26ea2cbcca152bc0a9e322aa1b93 to your computer and use it in GitHub Desktop.
<?php
/**
* Sage includes
*
* The $sage_includes array determines the code library included in your theme.
* Add or remove files to the array as needed. Supports child theme overrides.
*
* Please note that missing files will produce a fatal error.
*
* @link https://github.com/roots/sage/pull/1042
*/
$sage_includes = [
'lib/assets.php', // Scripts and stylesheets
'lib/extras.php', // Custom functions
'lib/setup.php', // Theme setup
'lib/titles.php', // Page titles
'lib/wrapper.php', // Theme wrapper class
'lib/post_types.php', // Post Types
'lib/wp_bootstrap_nav_walker.php', // Post Types
'lib/customizer.php' // Theme customizer
];
foreach ($sage_includes as $file) {
if (!$filepath = locate_template($file)) {
trigger_error(sprintf(__('Error locating %s for inclusion', 'sage'), $file), E_USER_ERROR);
}
require_once $filepath;
}
unset($file, $filepath);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment