PluginProbe
The WP Remote WordPress Plugin / trunk
The WP Remote WordPress Plugin vtrunk
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 / response.php

response.php in The WP Remote WordPress Plugin trunk, at callback/response.php

37 lines 992 B
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('WPRCallbackResponse')) :
5
6 class WPRCallbackResponse extends WPRCallbackBase {
7 public $status;
8 public $bvb64cksize;
9
10 public function __construct($bvb64cksize) {
11 $this->status = array("blogvault" => "response");
12 $this->bvb64cksize = $bvb64cksize;
13 }
14
15 public function addStatus($key, $value) {
16 $this->status[$key] = $value;
17 }
18
19 public function addArrayToStatus($key, $value) {
20 if (!isset($this->status[$key])) {
21 $this->status[$key] = array();
22 }
23 $this->status[$key][] = $value;
24 }
25
26 public function terminate($resp = array()) {
27 $resp = array_merge($this->status, $resp);
28 $resp["signature"] = "Blogvault API";
29 $response = "bvbvbvbvbv".serialize($resp)."bvbvbvbvbv";
30 $response = "bvb64bvb64".$this->base64Encode($response, $this->bvb64cksize)."bvb64bvb64";
31 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Safe for API response
32 die($response);
33
34 exit;
35 }
36 }
37 endif;