PluginProbe
Migrate to WordPress.com / 5.72
Migrate to WordPress.com v5.72
6.72 6.65 trunk 5.72 5.81 5.88
wpcom-migration / callback / base.php

base.php in Migrate to WordPress.com 5.72, at callback/base.php

34 lines 756 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('BVCallbackBase')) :
5
6 class BVCallbackBase {
7
8 public static $wing_infos = array("BRAND_WING_VERSION" => '1.1',
9 "DB_WING_VERSION" => '1.3',
10 "ACCOUNT_WING_VERSION" => '1.2',
11 "MISC_WING_VERSION" => '1.3',
12 "FS_WING_VERSION" => '1.2',
13 "INFO_WING_VERSION" => '2.4',
14 "FS_WRITE_WING_VERSION" => '1.0',
15 );
16
17 public function objectToArray($obj) {
18 return json_decode(json_encode($obj), true);
19 }
20
21 public function base64Encode($data, $chunk_size) {
22 if ($chunk_size) {
23 $out = "";
24 $len = strlen($data);
25 for ($i = 0; $i < $len; $i += $chunk_size) {
26 $out .= base64_encode(substr($data, $i, $chunk_size));
27 }
28 } else {
29 $out = base64_encode($data);
30 }
31 return $out;
32 }
33 }
34 endif;