/** * this function exists just to fix the issue with qtranslate :/ (it only fix it partially) * @param type $extendedplugin */ public static function load_lang_init($extendedplugin = false) { $config =& WYSIJA::get('config', 'model'); $debugmode = (int) $config->getValue('debug_new'); if ($debugmode == 0 || $debugmode > 0 && !WYSIJA::is_wysija_admin($debugmode)) { $extensionloaded = WYSIJA::load_lang('get_all'); foreach ($extensionloaded as $extendedplugin => $transstring) { $filename = WYSIJA_PLG_DIR . $extendedplugin . DS . 'languages' . DS . $transstring . '-' . get_locale() . '.mo'; if (file_exists($filename)) { load_textdomain($transstring, $filename); } } } }
function main() { echo $this->messages(); ?> <div id="wysija-config"> <?php $this->tabs(); ?> <form name="wysija-settings" method="post" id="wysija-settings" action="" class="form-valid" autocomplete="off"> <div id="basics" class="wysija-panel"> <?php $this->basics(); ?> <p class="submit"> <input type="submit" value="<?php echo esc_attr(__('Save settings', WYSIJA)); ?> " class="button-primary wysija" /> </p> </div> <div id="subforms" class="wysija-panel"> <?php if (WYSIJA::is_wysija_admin()) { $this->subforms(); } ?> </div> <div id="emailactiv" class="wysija-panel"> <?php $this->emailactiv(); ?> <p class="submit"> <input type="submit" value="<?php echo esc_attr(__('Save settings', WYSIJA)); ?> " class="button-primary wysija" /> </p> </div> <div id="sendingmethod" class="wysija-panel"> <?php $this->sendingmethod(); ?> <p class="submit"> <input type="submit" value="<?php echo esc_attr(__('Save settings', WYSIJA)); ?> " class="button-primary wysija" /> </p> </div> <div id="advanced" class="wysija-panel"> <?php $this->advanced(); ?> <p class="submit"> <input type="submit" value="<?php echo esc_attr(__('Save settings', WYSIJA)); ?> " class="button-primary wysija" /> </p> </div> <?php add_filter('wysija_extend_settings_content', array($this, 'extend_settings_premium'), 8, 2); echo apply_filters('wysija_extend_settings_content', '', array('viewObj' => &$this)); ?> <p class="submitee"> <?php $this->secure(array('action' => "save")); ?> <input type="hidden" value="save" name="action" /> <input type="hidden" value="" name="redirecttab" id="redirecttab" /> </p> </form> </div> <?php }
/** * this function exists just to fix the issue with qtranslate :/ (it only fix it partially) * @param type $extended_plugin */ public static function load_lang_init($extended_plugin = false) { $model_config = WYSIJA::get('config', 'model'); $debug_mode = (int) $model_config->getValue('debug_new'); if ($debug_mode === 0 || $debug_mode > 0 && WYSIJA::is_wysija_admin($debug_mode) === false) { $extensions_loaded = WYSIJA::load_lang('get_all'); foreach ($extensions_loaded as $extended_plugin => $translation_string) { // check for translation file overriding from transstring wp-content/languages/wysija-newsletters/wysija-newsletters-en_US.mo $filename = WP_CONTENT_DIR . DS . 'languages' . DS . $extended_plugin . DS . $translation_string . '-' . get_locale() . '.mo'; if (!file_exists($filename)) { // get the translation file in our local file $filename = WYSIJA_PLG_DIR . $extended_plugin . DS . 'languages' . DS . $translation_string . '-' . get_locale() . '.mo'; } // load the translation file with WP's load_textdomain if (file_exists($filename)) { load_textdomain($translation_string, $filename); } } } }
/** * this function exists just to fix the issue with qtranslate :/ (it only fix it partially) * @param type $extendedplugin */ public static function load_lang_init($extendedplugin = false) { $config =& WYSIJA::get('config', 'model'); $debugmode = (int) $config->getValue('debug_new'); if ($debugmode == 0 || $debugmode > 0 && !WYSIJA::is_wysija_admin($debugmode)) { $extensionloaded = WYSIJA::load_lang('get_all'); foreach ($extensionloaded as $extendedplugin => $transstring) { load_plugin_textdomain($transstring, false, $extendedplugin . DS . 'languages'); } } }