File "config.class.php"
Full Path: /www/wwwroot/shphe-en.com/wp-content/plugins/prisna-wp-translate-automate/classes/config.class.php
File size: 4.51 KB
MIME-type: --
Charset: utf-8
<?php
/**
* Goodao Translate Automate
* http://www.Goodao.cn/
*
* LICENSE
*
* @package /license/ WP Translate
* @copyright Copyright (c) Goodao.cn
* @license http://www.Goodao.cn
* @version 1.1
* @date 2017-04-14
*/
class PrisnaWPTranslateAutomateConfig {
const NAME = 'PrisnaWPTranslateAutomateAutomate';
const VERSION = '1.1';
const UI_NAME = 'Goodao Translate Automate';
const ADMIN_LANGUAGE_DOMAIN = 'prisna_wp_translate_automate';
const ADMIN_SETTINGS_NAME = 'prisna-translate-automate-settings';
protected static $_settings = null;
public static function getName($_to_lower=false, $_ui=false) {
if ($_ui)
return $_to_lower ? strtolower(self::UI_NAME) : self::UI_NAME;
else
return $_to_lower ? strtolower(self::NAME) : self::NAME;
}
public static function getVersion() {
return self::VERSION;
}
public static function getAdminLanguageDomain() {
return self::ADMIN_LANGUAGE_DOMAIN;
}
public static function getAdminHandle() {
return self::ADMIN_SETTINGS_NAME;
}
public static function getSettings($_force=false, $_direct=false) {
return self::getDefaults();
}
public static function getDefaults($_force=false) {
return array(
'automate_to' => array(
'title_message' => PrisnaWPTranslateAutomateMessage::get('automate_to_title'),
'description_message' => PrisnaWPTranslateAutomateMessage::get('automate_to_description'),
'id' => 'prisna_automate_to',
'values' => PrisnaWPTranslateCommon::getLanguages(),
'value' => array(),
'type' => 'language',
'enable_order' => false,
'columns' => 4,
'group' => 0
),
'automate_source' => array(
'title_message' => PrisnaWPTranslateAutomateMessage::get('automate_source_title'),
'description_message' => PrisnaWPTranslateAutomateMessage::get('automate_source_description'),
'id' => 'prisna_automate_source',
'type' => 'radio',
'value' => 'sitemap',
'values' => array(
'sitemap' => PrisnaWPTranslateAutomateMessage::get('automate_source_sitemap'),
'url' => PrisnaWPTranslateAutomateMessage::get('automate_source_url'),
'category' => PrisnaWPTranslateAutomateMessage::get('automate_source_category')
),
'group' => 0
),
'automate_source_value_sitemap' => array(
'title_message' => PrisnaWPTranslateAutomateMessage::get('automate_source_value_sitemap_title'),
'description_message' => PrisnaWPTranslateAutomateMessage::get('automate_source_value_sitemap_description'),
'id' => 'prisna_automate_source_value_sitemap',
'type' => 'text',
'value' => '',
'dependence' => 'automate_source',
'dependence_show_value' => 'sitemap',
'group' => 0
),
'automate_source_value_url' => array(
'title_message' => PrisnaWPTranslateAutomateMessage::get('automate_source_value_url_title'),
'description_message' => PrisnaWPTranslateAutomateMessage::get('automate_source_value_url_description'),
'id' => 'prisna_automate_source_value_url',
'value' => '',
'dependence' => 'automate_source',
'dependence_show_value' => 'url',
'type' => 'textarea',
'group' => 0
),
'automate_source_value_category' => array(
'title_message' => PrisnaWPTranslateAutomateMessage::get('automate_source_value_category_title'),
'description_message' => PrisnaWPTranslateAutomateMessage::get('automate_source_value_category_description'),
'id' => 'prisna_automate_source_value_category',
'type' => 'text',
'value' => '',
'dependence' => 'automate_source',
'dependence_show_value' => 'category',
'group' => 0
),
'automate_retranslate_url' => array(
'title_message' => PrisnaWPTranslateAutomateMessage::get('automate_retranslate_url_title'),
'description_message' => PrisnaWPTranslateAutomateMessage::get('automate_retranslate_url_description'),
'id' => 'prisna_automate_action',
'type' => 'radio',
'value' => 'retranslate',
'values' => array(
'retranslate' => PrisnaWPTranslateAutomateMessage::get('automate_retranslate_url_retranslate'),
'skip' => PrisnaWPTranslateAutomateMessage::get('automate_retranslate_url_skip')
),
'group' => 0
),
'automate_timeout' => array(
'title_message' => PrisnaWPTranslateAutomateMessage::get('automate_timeout_title'),
'description_message' => PrisnaWPTranslateAutomateMessage::get('automate_timeout_description'),
'values' => PrisnaWPTranslateAutomateCommon::getTimeoutValues(),
'id' => 'prisna_automate_timeout',
'value' => '60',
'type' => 'select',
'group' => 0
),
);
}
}
?>