PluginProbe
The WP Remote WordPress Plugin / 4.66
The WP Remote WordPress Plugin v4.66
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 / account.php

account.php in The WP Remote WordPress Plugin 4.66, at callback/wings/account.php

57 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('BVAccountCallback')) :
5 class BVAccountCallback extends BVCallbackBase {
6 public $account;
7 public $settings;
8
9 const ACCOUNT_WING_VERSION = 1.0;
10
11 public function __construct($callback_handler) {
12 $this->account = $callback_handler->account;
13 $this->settings = $callback_handler->settings;
14 }
15
16 function process($request) {
17 $params = $request->params;
18 $account = $this->account;
19 $settings = $this->settings;
20 switch ($request->method) {
21 case "addacc":
22 WPRAccount::addAccount($this->settings, $params['public'], $params['secret']);
23 $resp = array("status" => WPRAccount::exists($this->settings, $params['public']));
24 break;
25 case "rmacc":
26 $resp = array("status" => WPRAccount::remove($this->settings, $params['public']));
27 break;
28 case "updt":
29 $account->updateInfo($params);
30 $resp = array("status" => WPRAccount::exists($this->settings, $params['pubkey']));
31 break;
32 case "updtapikey":
33 WPRAccount::updateApiPublicKey($this->settings, $params['pubkey']);
34 $resp = array("status" => $this->settings->getOption(WPRAccount::$api_public_key));
35 break;
36 case "rmbvscrt":
37 $resp = array("status" => $settings->deleteOption('bvSecretKey'));
38 break;
39 case "rmbvkeys":
40 $resp = array("status" => $settings->deleteOption('bvKeys'));
41 break;
42 case "rmdefpub":
43 $resp = array("status" => $settings->deleteOption('bvDefaultPublic'));
44 break;
45 case "rmoldbvacc":
46 $resp = array("status" => $settings->deleteOption('bvAccounts'));
47 break;
48 case "fetch":
49 $resp = array("status" => WPRAccount::allAccounts($this->settings));
50 break;
51 default:
52 $resp = false;
53 }
54 return $resp;
55 }
56 }
57 endif;