/**
 * Main
 *
 * @return	void
 * @since	1.0.0
 */
function buddyboss_global_search_init()
{
    global $bp, $buddyboss_global_search;
    $main_include = BUDDYBOSS_GLOBAL_SEARCH_PLUGIN_DIR . 'includes/main-class.php';
    try {
        if (file_exists($main_include)) {
            require $main_include;
        } else {
            $msg = sprintf(__("Couldn't load main class at:<br/>%s", 'buddypress-global-search'), $main_include);
            throw new Exception($msg, 404);
        }
    } catch (Exception $e) {
        $msg = sprintf(__("<h1>Fatal error:</h1><hr/><pre>%s</pre>", 'buddypress-global-search'), $e->getMessage());
        echo $msg;
    }
    $buddyboss_global_search = BuddyBoss_Global_Search_Plugin::instance();
}