Skip to content

Instantly share code, notes, and snippets.

@regenrek
Created December 28, 2017 07:05
Show Gist options
  • Save regenrek/e0401cfbfa1a8b14b99f53f3b4260874 to your computer and use it in GitHub Desktop.
Save regenrek/e0401cfbfa1a8b14b99f53f3b4260874 to your computer and use it in GitHub Desktop.
<?php
// bootstrap.php
private function _includes(){
global $ae_template;
require_once AE_PRO_PATH.'includes/themes/Ae_Theme_Base.php';
if(file_exists(AE_PRO_PATH.'includes/themes/'.$ae_template.'/Ae_Theme.php')){
require_once AE_PRO_PATH.'includes/themes/'.$ae_template.'/Ae_Theme.php';
}else{
add_action( 'after_setup_theme', function() {
do_action( 'ae_external_theme_support' );
});
}
// ... rest of the code
}
?>
// theme functions.php
<?php
add_action('ae_external_theme_support', function() {
require_once get_template_directory() . '/Ae_Theme.php';
});
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment