send_remote_request($data, $action); if (is_wp_error($response)) { $response = array('error' => true, 'code' => $response->get_error_code(), 'message' => $response->get_error_message()); } else { if (isset($response['status'])) { if (in_array($response['status'], array('authenticated', 'registered'))) { $response['redirect_url'] = $updraftplus->get_url('mothership').'/?udm_action=updraftcentral_cloud_redirect'; if (is_a($updraftplus_updraftcentral_main, 'UpdraftPlus_UpdraftCentral_Main')) { $response['keys_table'] = $updraftplus_updraftcentral_main->get_keys_table(); } } else { if ('error' === $response['status']) { $response = array( 'error' => true, 'code' => isset($response['code']) ? $response['code'] : -1, 'message' => isset($response['message']) ? $response['message'] : $this->translate_message('generic'), 'response' => $response ); } } } else { $response = array('error' => true, 'message' => $this->translate_message('generic')); } } return $response; } }