Skip to content

Instantly share code, notes, and snippets.

@templatemonster
Created December 12, 2016 13:12
Show Gist options
  • Save templatemonster/79263a455d763158685d1f3e0afbf736 to your computer and use it in GitHub Desktop.
Save templatemonster/79263a455d763158685d1f3e0afbf736 to your computer and use it in GitHub Desktop.
/**
* Load Cherry V core
*/
add_action( 'after_setup_theme', 'twentyseventeen_core', 1 );
function twentyseventeen_core() {
global $chery_core_version;
static $core = null;
if ( null !== $core ) {
return $core;
}
if ( 0 < sizeof( $chery_core_version ) ) {
$core_paths = array_values( $chery_core_version );
require_once( $core_paths[0] );
} else {
die( 'Class Cherry_Core not found' );
}
$core = new Cherry_Core( array(
'base_dir' => get_template_directory() . '/cherry-framework',
'base_url' => get_template_directory_uri() . '/cherry-framework',
'modules' => array(
'cherry-js-core' => array(
'autoload' => true,
),
'cherry-ui-elements' => array(
'autoload' => false,
),
'cherry-interface-builder' => array(
'autoload' => false,
),
'cherry-widget-factory' => array(
'autoload' => true,
),
'cherry-customizer' => array(
'autoload' => false,
),
'cherry-dynamic-css' => array(
'autoload' => false,
),
'cherry-google-fonts-loader' => array(
'autoload' => false,
),
'cherry-term-meta' => array(
'autoload' => false,
),
'cherry-post-meta' => array(
'autoload' => false,
),
'cherry-breadcrumbs' => array(
'autoload' => false,
),
),
) );
return $core;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment