当前位置: 首页>>代码示例>>PHP>>正文


PHP WYSIJA::load_lang_init方法代码示例

本文整理汇总了PHP中WYSIJA::load_lang_init方法的典型用法代码示例。如果您正苦于以下问题:PHP WYSIJA::load_lang_init方法的具体用法?PHP WYSIJA::load_lang_init怎么用?PHP WYSIJA::load_lang_init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WYSIJA的用法示例。


在下文中一共展示了WYSIJA::load_lang_init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load_lang

 function load_lang($extendedplugin = false)
 {
     static $extensionloaded = false;
     if (!$extendedplugin) {
         return $extensionloaded;
     }
     if (!$extensionloaded) {
         add_action('init', array("WYSIJA", "load_lang_init"));
     }
     /*load the language file*/
     if (!$extensionloaded || !isset($extensionloaded[$extendedplugin])) {
         switch ($extendedplugin) {
             case "wysija-newsletters":
                 $transstring = WYSIJA;
                 break;
             case "wysijashop":
                 $transstring = WYSIJASHOP;
                 break;
             case "wysijacrons":
                 $transstring = WYSIJACRONS;
                 break;
             case "get_all":
                 return $extensionloaded;
         }
         /*
          * Who commented that line ? I don't remember doing it.(Ben)
          * Leave it be please
          */
         if (!isset($extensionloaded[$extendedplugin])) {
             load_plugin_textdomain($transstring, false, $extendedplugin . DS . 'languages');
         }
         $extensionloaded[$extendedplugin] = $transstring;
         $config =& WYSIJA::get('config', 'model');
         //TODO I don't remember why do we load_lang_init twice I think it has to do with qTranslate compatibility ....
         if (!((int) $config->getValue('debug_new') > 1)) {
             WYSIJA::load_lang_init();
         }
     }
 }
开发者ID:rotoballer,项目名称:emily,代码行数:39,代码来源:base.php

示例2: load_lang

 public static function load_lang($extendedplugin = false)
 {
     static $extensionloaded = false;
     if (!$extendedplugin) {
         return $extensionloaded;
     }
     if (!$extensionloaded) {
         add_action('init', array('WYSIJA', 'load_lang_init'));
     }
     /*load the language file*/
     if (!$extensionloaded || !isset($extensionloaded[$extendedplugin])) {
         $transstring = null;
         switch ($extendedplugin) {
             case 'wysija-newsletters':
                 $transstring = WYSIJA;
                 break;
             case 'wysijashop':
                 $transstring = WYSIJASHOP;
                 break;
             case 'wysijacrons':
                 $transstring = WYSIJACRONS;
                 break;
             case 'wysija-newsletters-premium':
                 $transstring = WYSIJANLP;
                 break;
             case 'get_all':
                 return $extensionloaded;
         }
         /*
          * Necessary somehow
          */
         if ($transstring !== null) {
             if (!isset($extensionloaded[$extendedplugin])) {
                 //we need to call the config this way otherwise it will loop
                 $config =& WYSIJA::get('config', 'model', false, 'wysija-newsletters', false);
                 $debugmode = 0;
                 if (is_object($config) && method_exists($config, 'getValue')) {
                     $debugmode = (int) $config->getValue('debug_new');
                 }
                 if ($debugmode == 0 || $debugmode > 0 && !WYSIJA::is_wysija_admin($debugmode)) {
                     load_plugin_textdomain($transstring, false, $extendedplugin . DS . 'languages');
                 }
             }
             $extensionloaded[$extendedplugin] = $transstring;
         }
         //TODO I don't remember why do we load_lang_init twice I think it has to do with qTranslate compatibility ....
         WYSIJA::load_lang_init();
     }
 }
开发者ID:fwelections,项目名称:fwelections,代码行数:49,代码来源:base.php


注:本文中的WYSIJA::load_lang_init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。