public static function run() { require_once dirname(__FILE__) . '/classes/config.class.php'; $name = PrisnaGWTConfig::getDbSettingsName(); if (get_option($name)) { delete_option($name); } }
public static function getSettings($_force = false, $_direct = false) { if (is_array(self::$_settings) && $_force == false) { return self::$_settings; } $current = self::_get_settings(); if ($_direct) { return $current; } $defaults = self::getDefaults(); $result = PrisnaGWTCommon::mergeArrays($defaults, $current); $result = self::_adjust_languages($result, $current); return self::$_settings = $result; }
public static function isLoadingAdminPage() { return in_array(PrisnaGWTCommon::getVariable('page', 'GET'), array(PrisnaGWTConfig::getAdminHandle())); }
protected function _gen_options() { $this->align_mode = PrisnaGWTConfig::getSettingValue('align_mode'); $this->_gen_layout(); $this->_gen_languages(); $this->_gen_google_analytics(); $this->_gen_banner(); $this->_gen_flags(); $result = array(); foreach ($this->_properties as $key => $property) { if (array_key_exists('option_id', $property) && !PrisnaGWTValidator::isEmpty($property['option_id'])) { $result[$key] = array('option_id' => $property['option_id'], 'value' => $this->_prepare_option_value($key, $property['value'])); } } $this->options_formatted = PrisnaGWTCommon::renderObject($result, array('type' => 'html', 'content' => "\t\t{{ option_id }}: {{ value }},\n")); $this->options_formatted = preg_replace('/,\\n$/', "\n", $this->options_formatted); }
public function __construct($_properties) { $this->xml_url = PrisnaGWTCommon::getHomeUrl('/' . PrisnaGWTConfig::getSitemapFilename() . '.xml'); $this->csv_url = PrisnaGWTCommon::getHomeUrl('/' . PrisnaGWTConfig::getSitemapFilename() . '.csv'); parent::__construct($_properties); }
public static function isAvailable() { if (PrisnaGWTConfig::getSettingValue('test_mode') == 'true' && !current_user_can('administrator')) { return false; } return true; }