false, // which external msgfmt command to use 'which_msgfmt' => '', // whether to compile hash table into MO files 'gen_hash' => '0', // whether to include Fuzzy strings in MO files 'use_fuzzy' => '1', // number of backups to keep of PO and MO files 'num_backups' => '1', // whether to enable core package translation '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();