PluginProbe
The WP Remote WordPress Plugin / 4.74
The WP Remote WordPress Plugin v4.74
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | callback/wings/brand.php +25 -16 6.654.74 View file →
@@ -1,13 +1,13 @@
1 1 <?php
2 2
3 3 if (!defined('ABSPATH')) exit;
4 -if (!class_exists('WPRBrandCallback')) :
4 +if (!class_exists('BVBrandCallback')) :
5 5
6 -class WPRBrandCallback extends WPRCallbackBase {
6 +class BVBrandCallback extends BVCallbackBase {
7 7 public $settings;
8 8
9 - const BRAND_WING_VERSION = 1.1;
9 + const BRAND_WING_VERSION = 1.0;
10 10
11 11 public function __construct($callback_handler) {
12 12 $this->settings = $callback_handler->settings;
13 13 }
@@ -14,30 +14,39 @@
14 14
15 15 public function process($request) {
16 16 $bvinfo = new WPRInfo($this->settings);
17 17 $option_name = $bvinfo->brand_option;
18 - $whitelabel_infos = $bvinfo->getPluginsWhitelabelInfos();
19 18 $params = $request->params;
20 19 switch($request->method) {
21 20 case 'setbrand':
22 - foreach ($params as $slug => $whitelabel_info) {
23 - if (isset($slug) && is_array($whitelabel_info)) {
24 - $whitelabel_infos[$slug] = $whitelabel_info;
21 + $brandinfo = array();
22 + if (array_key_exists('hide', $params)) {
23 + $brandinfo['hide'] = $params['hide'];
24 + } else {
25 + $brandinfo['name'] = $params['name'];
26 + $brandinfo['title'] = $params['title'];
27 + $brandinfo['description'] = $params['description'];
28 + $brandinfo['pluginuri'] = $params['pluginuri'];
29 + $brandinfo['author'] = $params['author'];
30 + $brandinfo['authorname'] = $params['authorname'];
31 + $brandinfo['authoruri'] = $params['authoruri'];
32 + $brandinfo['menuname'] = $params['menuname'];
33 + $brandinfo['logo'] = $params['logo'];
34 + $brandinfo['webpage'] = $params['webpage'];
35 + $brandinfo['appurl'] = $params['appurl'];
36 + if (array_key_exists('hide_plugin_details', $params)) {
37 + $brandinfo['hide_plugin_details'] = $params['hide_plugin_details'];
25 38 }
39 + if (array_key_exists('hide_from_menu', $params)) {
40 + $brandinfo['hide_from_menu'] = $params['hide_from_menu'];
41 + }
26 42 }
27 - $this->settings->updateOption($option_name, $whitelabel_infos);
43 + $this->settings->updateOption($option_name, $brandinfo);
28 44 $resp = array("setbrand" => $this->settings->getOption($option_name));
29 45 break;
30 46 case 'rmbrand':
31 - foreach ($params["delete_keys"] as $slug) {
32 - unset($whitelabel_infos[$slug]);
33 - }
34 - $this->settings->updateOption($option_name, $whitelabel_infos);
35 - $resp = array("rmbrand" => true);
36 - break;
37 - case 'rmallbrands':
38 47 $this->settings->deleteOption($option_name);
39 - $resp = array("rmallbrands" => !$this->settings->getOption($option_name));
48 + $resp = array("rmbrand" => !$this->settings->getOption($option_name));
40 49 break;
41 50 default:
42 51 $resp = false;
43 52 }