PluginProbe
Translation with DeepL API / 2.4.3.9
Translation with DeepL API v2.4.3.9
trunk 0.1.20180323 1.0 1.2.5.1 1.5.2.5 1.7.5 2.4.3.12 2.4.3.9 2.4.5
← All changes | client/deeplapi.class.php +1 -6 2.4.52.4.3.9 View file →
@@ -54,12 +54,8 @@
54 54
55 55 $this->cache_dir = $this->getCacheDirectory();
56 56 }
57 57
58 - public function allowCache( $allow_cache ) {
59 - $this->allow_cache = filter_var( $allow_cache, FILTER_VALIDATE_BOOLEAN );
60 - }
61 -
62 58 public function wasItCached() {
63 59 return $this->response_type === 'cache';
64 60 }
65 61
@@ -432,10 +428,10 @@
432 428 $args['headers'] = $this->addHeaders( $args['headers'] );
433 429
434 430 $remoteURL = $this->getEndPointURL();
435 431 //if( $args['query'] ) $remoteURL .= '?' . $args['query'];
432 + //plouf( $args, "REQUESTING URL = '$url'" ); die( '6ze846az6e646eok' );
436 433
437 -
438 434 $curl_string = 'curl -X ' . $args['method'] . " '$remoteURL'\n";
439 435 foreach( $args['headers'] as $key => $value ) {
440 436 $curl_string .= "$key: $value\n";
441 437 }
@@ -446,9 +442,8 @@
446 442
447 443 // plouf( $args, $remoteURL ); die('oazea4ze9684e84azek');
448 444
449 445 $response = wp_remote_get( $remoteURL, $args );
450 - //plouf( $args, $remoteURL ); plouf( $response ); die('ok');
451 446 if ( is_wp_error( $response ) ) {
452 447 $this->response = $response->get_error_message();
453 448 } else {
454 449 $this->response = $response;