PluginProbe
The WP Remote WordPress Plugin / 4.73
The WP Remote WordPress Plugin v4.73
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
wpremote / callback / wings / brand.php

brand.php in The WP Remote WordPress Plugin 4.73, at callback/wings/brand.php

56 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) exit;
4 if (!class_exists('BVBrandCallback')) :
5
6 class BVBrandCallback extends BVCallbackBase {
7 public $settings;
8
9 const BRAND_WING_VERSION = 1.0;
10
11 public function __construct($callback_handler) {
12 $this->settings = $callback_handler->settings;
13 }
14
15 public function process($request) {
16 $bvinfo = new WPRInfo($this->settings);
17 $option_name = $bvinfo->brand_option;
18 $params = $request->params;
19 switch($request->method) {
20 case 'setbrand':
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'];
38 }
39 if (array_key_exists('hide_from_menu', $params)) {
40 $brandinfo['hide_from_menu'] = $params['hide_from_menu'];
41 }
42 }
43 $this->settings->updateOption($option_name, $brandinfo);
44 $resp = array("setbrand" => $this->settings->getOption($option_name));
45 break;
46 case 'rmbrand':
47 $this->settings->deleteOption($option_name);
48 $resp = array("rmbrand" => !$this->settings->getOption($option_name));
49 break;
50 default:
51 $resp = false;
52 }
53 return $resp;
54 }
55 }
56 endif;