global $wp_version; $itxapi_username = strtolower($settings_result['data']['itxapi_username']); $itxapi_password = iThemes_Credentials::get_password_hash($itxapi_username, $settings_result['data']['itxapi_password_raw']); $itxapi_token = ITXAPI_Helper2::get_wordpress_phpass('jwooley', $itxapi_password, 'http://jordan.dev.ithemes.com', '4.1'); //site_url(), $wp_version ); $url_params = array('action' => 'connect', 'user' => $itxapi_username, 'wp' => $wp_version, 'site' => site_url(), 'timestamp' => time()); $post_params = array('auth_token' => $itxapi_token); echo 'username: '******'passhash: '; echo $itxapi_password . '<br>'; echo '<pre>'; print_r($url_params); print_r($post_params); echo '</pre>'; $response = ITXAPI_Helper2::remote_post($url_params, $post_params); if (!is_array($response)) { // Error message. die($response); } else { print_r($response); $credentials_form->display_settings('Submit'); } } } // end form submitted. } elseif ($mode == 'edit') { // EDIT MODE. //echo 'editmode?'; $account_info = pb_backupbuddy_destination_stash::get_quota(array('itxapi_username' => $destination_settings['itxapi_username'], 'itxapi_password' => $destination_settings['itxapi_password'])); $itxapi_username = $destination_settings['itxapi_username'];