PluginProbe
Image Optimizer – Compress Images and Convert to WebP or AVIF / trunk
Image Optimizer – Compress Images and Convert to WebP or AVIF vtrunk
1.7.7 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 All 33 releases
← All changes | modules/oauth/module.php +13 -7 1.0.1 → trunk View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2
3 -namespace ImageOptimizer\Modules\Oauth;
3 +namespace ImageOptimization\Modules\Oauth;
4 4
5 -use ImageOptimizer\Classes\Module_Base;
5 +use ImageOptimization\Classes\Module_Base;
6 6
7 7 if ( ! defined( 'ABSPATH' ) ) {
8 - exit; // Exit if accessed directly
8 + exit; // Exit if accessed directly.
9 9 }
10 10
11 11 /**
12 12 * Class Module
@@ -21,19 +21,20 @@
21 21 public function get_name(): string {
22 22 return 'oauth';
23 23 }
24 24
25 - public static function routes_list() : array {
25 + public static function routes_list(): array {
26 26 return [
27 - 'ConnectInit',
27 + 'Connect_Init',
28 28 'Disconnect',
29 - 'GetSubscriptions',
29 + 'Get_Subscriptions',
30 30 'Activate',
31 31 'Deactivate',
32 + 'Version',
32 33 ];
33 34 }
34 35
35 - public static function component_list() : array {
36 + public static function component_list(): array {
36 37 return [
37 38 'Connect',
38 39 'Checkpoint',
39 40 'Connect_Pointer',
@@ -39,9 +40,14 @@
39 40 'Connect_Pointer',
40 41 ];
41 42 }
42 43
44 + public static function is_active(): bool {
45 + return ! empty( get_option( 'image_optimizer_client_data' ) );
46 + }
47 +
43 48 public function __construct() {
49 +
44 50 $this->register_components();
45 51 $this->register_routes();
46 52 }
47 53 }