PluginProbe
Extendify / 3.1.3
Extendify v3.1.3
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / app / Shared / Services / PluginsActivation / Imagify.php

Imagify.php in Extendify 3.1.3, at app/Shared/Services/PluginsActivation/Imagify.php

33 lines 799 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Extendify\Shared\Services\PluginsActivation;
4
5 defined('ABSPATH') || die('No direct access.');
6
7 class Imagify extends PluginActivation
8 {
9 // phpcs:ignore PSR12.Properties.ConstantVisibility.NotFound
10 const API_URL = 'https://app.imagify.io/api/partners/users/';
11
12 public static function slug(): string
13 {
14 return 'imagify';
15 }
16
17 protected static function saveKey(array $data)
18 {
19 $key = $data['api_key'] ?? null;
20
21 if (!$key) {
22 return;
23 }
24
25 $settings = (array) \get_option('imagify_settings', []);
26 $settings['api_key'] = \sanitize_text_field($key);
27 \update_option('imagify_settings', $settings);
28
29 // clear the stale validation cache.
30 \delete_transient('imagify_user_cache');
31 }
32 }
33