/**
 * instantiation of xili_language class
 *
 * @since 1.8.8 to verify that WP 3.0 is installed
 * @updated for 1.8.9, 2.3.1, 2.7.1 (function)
 *
 */
function xili_language_start()
{
    global $wp_version, $xili_language, $xili_language_admin;
    if (version_compare(PHP_VERSION, XILILANGUAGE_PHP_VER, '<')) {
        add_action('admin_notices', 'xili_language_need_php5');
        return;
    } elseif (version_compare($wp_version, XILILANGUAGE_WP_VER, '<') && XILILANGUAGE_VER > XILILANGUAGE_PREV_VER) {
        add_action('admin_notices', 'xili_language_need_31');
        return;
    } else {
        // new sub-folder since 2.6
        require_once plugin_dir_path(__FILE__) . 'xili-includes/xili-language-widgets.php';
        require_once plugin_dir_path(__FILE__) . 'xili-includes/theme-multilingual-classes.php';
        // since 2.20.0
        /**
         * instantiation of xili_language class
         *
         * @since 0.9.7
         * @updated 2.6
         *
         *
         * @param locale_method (true for cache compatibility... in current tests with johan.eenfeldt@kostdoktorn.se)
         * @param future version
         */
        $xili_language = new xili_language(false, false);
        if (is_admin()) {
            $plugin_path = dirname(__FILE__);
            // w/o / at end
            require $plugin_path . '/xili-includes/xl-class-admin.php';
            $xili_language_admin = new xili_language_admin($xili_language);
        }
        /**
         * Enable to add functions and filters that are not in theme's functions.php
         * These filters are common even if you change default theme...
         * Place your functions.php in folder plugins/xilidev-libraries/
         * if you have a filter in this file, avoid to have similar one in functions.php of the theme !!!
         *
         * (for tests, check / uncheck 'enable gold functions' in settings UI)
         * @since 1.0
         * @updated 1.4.0
         */
        $xili_language->insert_gold_functions();
    }
}