PluginProbe
Image Optimization – Compress Images and Convert to WebP or AVIF / 1.6.6
Image Optimization – Compress Images and Convert to WebP or AVIF v1.6.6
1.7.6 1.7.5 1.7.4 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 All 32 releases
image-optimization / modules / connect-manager / classes / connect-runner.php

connect-runner.php in Image Optimization – Compress Images and Convert to WebP or AVIF 1.6.6, at modules/connect-manager/classes/connect-runner.php

99 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace ImageOptimization\Modules\ConnectManager\Classes;
3
4 use ImageOptimization\Modules\ConnectManager\Components\Connect_Interface;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // exit if accessed directly
8 }
9
10 class Connect_Runner {
11 public $connect;
12
13 public function __construct( Connect_Interface $connect ) {
14 $this->connect = $connect;
15 }
16
17 public function is_connected() {
18 return $this->connect->is_connected();
19 }
20
21 public function is_activated() : bool {
22 return $this->connect->is_activated();
23 }
24
25 public function is_valid_home_url() : bool {
26 return $this->connect->is_valid_home_url();
27 }
28
29 public function get_connect_status() {
30 return $this->connect->get_connect_status();
31 }
32
33 public function get_connect_data( bool $force = false ): array {
34 return $this->connect->get_connect_data( $force );
35 }
36
37 public function update_usage_data( $new_usage_data ): void {
38 $this->connect->update_usage_data( $new_usage_data );
39 }
40
41 public function get_activation_state() : string {
42 return $this->connect->get_activation_state();
43 }
44
45 public function get_access_token() {
46 return $this->connect->get_access_token();
47 }
48
49 public function get_client_id(): string {
50 return $this->connect->get_client_id();
51 }
52
53 public function get_client_secret(): string {
54 return $this->connect->get_client_secret();
55 }
56
57 public function images_left(): int {
58 return $this->connect->images_left();
59 }
60
61 public function user_is_subscription_owner(): bool {
62 return $this->connect->user_is_subscription_owner();
63 }
64
65 // Legacy Nonces.
66
67 public function connect_init_nonce(): string {
68 return $this->connect->connect_init_nonce();
69 }
70
71 public function disconnect_nonce(): string {
72 return $this->connect->disconnect_nonce();
73 }
74
75 public function deactivate_nonce(): string {
76 return $this->connect->deactivate_nonce();
77 }
78
79 public function get_subscriptions_nonce(): string {
80 return $this->connect->get_subscriptions_nonce();
81 }
82
83 public function activate_nonce(): string {
84 return $this->connect->activate_nonce();
85 }
86
87 public function version_nonce(): string {
88 return $this->connect->version_nonce();
89 }
90
91 public function get_is_connect_on_fly(): bool {
92 return $this->connect->get_is_connect_on_fly();
93 }
94
95 public function refresh_token(): void {
96 $this->connect->refresh_token();
97 }
98 }
99