| @@ -21,9 +21,9 @@ | ||
| 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 | 27 | 'Connect_Init', |
| 28 | 28 | 'Disconnect', |
| 29 | 29 | 'Get_Subscriptions', |
| @@ -28,12 +28,13 @@ | ||
| 28 | 28 | 'Disconnect', |
| 29 | 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 | } |