本文整理汇总了PHP中WYSIJA::is_wysija_admin方法的典型用法代码示例。如果您正苦于以下问题:PHP WYSIJA::is_wysija_admin方法的具体用法?PHP WYSIJA::is_wysija_admin怎么用?PHP WYSIJA::is_wysija_admin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WYSIJA
的用法示例。
在下文中一共展示了WYSIJA::is_wysija_admin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load_lang_init
/**
* 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);
}
}
}
}
示例2: main
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
}
示例3: load_lang_init
/**
* 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);
}
}
}
}
示例4: load_lang_init
/**
* 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');
}
}
}