options=$options; } $this->add_remote=false; $this->google_drive_secrets = array("web"=>array( "client_id"=>"134809148507-32crusepgace4h6g47ota99jjrvf4j1u.apps.googleusercontent.com", "project_id"=>"wpvivid-auth", "auth_uri"=>"https://accounts.google.com/o/oauth2/auth", "token_uri"=>"https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url"=>"https://www.googleapis.com/oauth2/v1/certs", "client_secret"=>"", "redirect_uris"=>array("https://auth.wpvivid.com/google_drive_v2/") )); } public function pre_add_remote($remote,$id) { if($remote['type']==WPVIVID_REMOTE_GOOGLEDRIVE) { $remote['id']=$id; } return $remote; } public function handle_auth_actions() { if(isset($_GET['action']) && isset($_GET['page'])) { if($_GET['page'] === 'WPvivid') { if($_GET['action']=='wpvivid_google_drive_auth') { $check=current_user_can('manage_options'); if(!$check) { return; } $rand_id = substr(md5(time().rand()), 0,13); $auth_id = 'wpvivid-auth-'.$rand_id; $res = $this -> compare_php_version(); if($res['result'] == WPVIVID_FAILED){ echo '
'.esc_html($res['error']).'
'.esc_html($error_msg).'
'.esc_html($error_msg).'
'.esc_html($e->getMessage()).'
'; esc_html_e('You have authenticated the Google Drive account as your remote storage.', 'wpvivid-backuprestore'); echo '
'.esc_html($e->getMessage()).'
'.esc_html($e->getMessage()).'
'; esc_html_e('You have authenticated the Google Drive account as your remote storage.', 'wpvivid-backuprestore'); echo '
'.esc_html($_GET['resp_msg']).'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|