<?php if (!defined('ABSPATH')) exit; if (!class_exists('MCWPAPI')) : class MCWPAPI { public $settings; public function __construct($settings) { $this->settings = $settings; } public function pingbv($method, $body, $public = false) { if ($public) { return $this->do_request($method, $body, $public); } else { $api_public_key = $this->settings->getOption('bvApiPublic'); if (!empty($api_public_key) && (strlen($api_public_key) >= 32)) { return $this->do_request($method, $body, $api_public_key); } } } public function do_request($method, $body, $pubkey) { $account = MCAccount::find($this->settings, $pubkey); if (isset($account)) { $url = $account->authenticatedUrl($method); return $this->http_request($url, $body); } } public function http_request($url, $body, $headers = array()) { $_body = array( 'method' => 'POST', 'timeout' => 15, 'body' => $body ); if (!empty($headers)) { $_body['headers'] = $headers; } return wp_remote_post($url, $_body); } } endif;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
admin | Folder | 0755 |
|
|
callback | Folder | 0755 |
|
|
css | Folder | 0755 |
|
|
form_testing | Folder | 0755 |
|
|
img | Folder | 0755 |
|
|
php_error_monitoring | Folder | 0755 |
|
|
protect | Folder | 0755 |
|
|
public_keys | Folder | 0755 |
|
|
wp_2fa | Folder | 0755 |
|
|
account.php | File | 7.14 KB | 0644 |
|
helper.php | File | 10.68 KB | 0644 |
|
info.php | File | 7.66 KB | 0644 |
|
license.txt | File | 19.46 KB | 0644 |
|
malcare.php | File | 8.49 KB | 0644 |
|
readme.txt | File | 32.06 KB | 0644 |
|
recover.php | File | 1.71 KB | 0644 |
|
wp_actions.php | File | 2.92 KB | 0644 |
|
wp_actlog.php | File | 17.52 KB | 0644 |
|
wp_admin.php | File | 12.67 KB | 0644 |
|
wp_api.php | File | 1.04 KB | 0644 |
|
wp_cli.php | File | 5.6 KB | 0644 |
|
wp_db.php | File | 6.1 KB | 0644 |
|
wp_dynsync.php | File | 34.75 KB | 0644 |
|
wp_file_system.php | File | 2.29 KB | 0644 |
|
wp_login_whitelabel.php | File | 1.48 KB | 0644 |
|
wp_settings.php | File | 2.06 KB | 0644 |
|
wp_site_info.php | File | 2.4 KB | 0644 |
|