function yg_shutdown() { DB::close(); fire_hook('shutdown'); }
function yg_messages($type = null) { add_action('yg_messages', 'yg_print_messages', $type); fire_hook('yg_messages'); }
function yg_meta() { fire_hook("yg_meta"); }
require_once YG_INCLUDEPATH . DS . 'bcrypt.class.php'; require_once YG_INCLUDEPATH . DS . 'core.class.php'; require_once YG_INCLUDEPATH . DS . 'session.class.php'; require_once YG_INCLUDEPATH . DS . 'stringmanager.php'; require_once YG_INCLUDEPATH . DS . 'functions.php'; if (!Session::isLogged() && (!defined('YG_SKIP_LOGINCHECK') || YG_SKIP_LOGINCHECK == false)) { header('Location: ' . get_site_url() . '/login.php?msg=notauthorized&returnpath=' . rawurlencode(get_current_url())); exit; } require_once YG_INCLUDEPATH . DS . 'pluginmanager.class.php'; require_once YG_INCLUDEPATH . DS . 'database.class.php'; require_once YG_INCLUDEPATH . DS . 'translation.class.php'; if (YG_ENABLE_THEME) { require_once YG_INCLUDEPATH . DS . 'templatemanager.php'; } #require_once(YG_INCLUDEPATH . DS . 'formgen.php'); DB::connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); fire_hook('init'); load_default_domain(); $PluginManager = new PluginManager(); $PluginManager->loadEnabled(); fire_hook('modload'); if (YG_ENABLE_THEME) { $template = get_query_template('functions'); if (!empty($template)) { load_template($template, true); } else { Core::log('Mandatory functions file missing for theme', YG_WARNING); } } register_shutdown_function('yg_shutdown');
function get_template_part($slug) { fire_hook("get_template_part_{$slug}"); $templates = array(); $templates[] = "{$slug}.php"; locate_template($templates, true, false); }