本文整理匯總了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');
}
}
}