<?php if (!defined('ABSPATH')) exit; if (!class_exists('BVBrandCallback')) : class BVBrandCallback extends BVCallbackBase { public $settings; const BRAND_WING_VERSION = 1.1; public function __construct($callback_handler) { $this->settings = $callback_handler->settings; } public function process($request) { $bvinfo = new MCInfo($this->settings); $option_name = $bvinfo->brand_option; $whitelabel_infos = $bvinfo->getPluginsWhitelabelInfos(); $params = $request->params; switch($request->method) { case 'setbrand': foreach ($params as $slug => $whitelabel_info) { if (isset($slug) && is_array($whitelabel_info)) { $whitelabel_infos[$slug] = $whitelabel_info; } } $this->settings->updateOption($option_name, $whitelabel_infos); $resp = array("setbrand" => $this->settings->getOption($option_name)); break; case 'rmbrand': foreach ($params["delete_keys"] as $slug) { unset($whitelabel_infos[$slug]); } $this->settings->updateOption($option_name, $whitelabel_infos); $resp = array("rmbrand" => true); break; case 'rmallbrands': $this->settings->deleteOption($option_name); $resp = array("rmallbrands" => !$this->settings->getOption($option_name)); break; default: $resp = false; } return $resp; } } endif;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
account.php | File | 2.71 KB | 0644 |
|
actlog.php | File | 1.65 KB | 0644 |
|
brand.php | File | 1.27 KB | 0644 |
|
bv_upgrader_skin.php | File | 2.23 KB | 0644 |
|
db.php | File | 11.76 KB | 0644 |
|
dynsync.php | File | 2.57 KB | 0644 |
|
fs.php | File | 11.87 KB | 0644 |
|
fs_write.php | File | 11.56 KB | 0644 |
|
info.php | File | 17.77 KB | 0644 |
|
ipstore.php | File | 4.03 KB | 0644 |
|
manage.php | File | 27.51 KB | 0644 |
|
misc.php | File | 8.17 KB | 0644 |
|
protect.php | File | 3.2 KB | 0644 |
|
security.php | File | 5.36 KB | 0644 |
|
watch.php | File | 10.43 KB | 0644 |
|