Exemplo n.º 1
0
            $conf = array('use_msgfmt' => false, 'which_msgfmt' => '', 'gen_hash' => '0', 'use_fuzzy' => '1', 'num_backups' => '1', 'enable_core' => '0');
            foreach ($conf as $key => $val) {
                $conf[$key] = get_option(Loco::NS . '-' . $key);
                if (!is_string($conf[$key])) {
                    $conf[$key] = $val;
                }
            }
        }
        foreach ($update as $key => $val) {
            if (isset($conf[$key])) {
                update_option(Loco::NS . '-' . $key, $val);
                $conf[$key] = $val;
            }
        }
        // force msgfmt usage if path is set (legacy installs/upgrades)
        if (false === $conf['use_msgfmt']) {
            $conf['use_msgfmt'] = $conf['which_msgfmt'] ? '1' : '0';
        }
        return $conf;
    }
    /**
     * Get Wordpress capability for all Loco Admin functionality
     */
    public static function admin_capablity()
    {
        return apply_filters('loco_admin_capability', 'manage_options');
    }
}
// minimum config
Loco::$cache_enabled = apply_filters('loco_cache_enabled', !WP_DEBUG) and Loco::$apc_enabled = function_exists('apc_fetch') && ini_get('apc.enabled');
Loco::load_textdomain();