PluginProbe
Extendify / trunk
Extendify vtrunk
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
← All changes | extendify.php +4 -35 3.0.5 → trunk View file →
@@ -6,9 +6,9 @@
6 6 * Description: AI-powered WordPress assistant for onboarding and ongoing editing offered exclusively through select WordPress hosting providers.
7 7 * Plugin URI: https://extendify.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
8 8 * Author: Extendify
9 9 * Author URI: https://extendify.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
10 - * Version: 3.0.5
10 + * Version: 3.2.1
11 11 * Requires at least: 6.5
12 12 * Requires PHP: 7.0
13 13 * License: GPL-2.0-or-later
14 14 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -28,10 +28,8 @@
28 28 // phpcs:enable Generic.Files.LineLength.TooLong
29 29
30 30 defined('ABSPATH') || exit;
31 31
32 -use Extendify\PartnerData;
33 -
34 32 /** ExtendifySdk is the previous class name used */
35 33 if (!class_exists('ExtendifySdk') && !class_exists('Extendify')) :
36 34
37 35 /**
@@ -64,8 +62,11 @@
64 62 }
65 63
66 64 if (!self::$loaded) {
67 65 self::$loaded = true;
66 + if (!defined('EXTENDIFY_PLUGIN_BASENAME')) {
67 + define('EXTENDIFY_PLUGIN_BASENAME', plugin_basename(__FILE__));
68 + }
68 69 require dirname(__FILE__) . '/bootstrap.php';
69 70 if (!defined('EXTENDIFY_BASE_URL')) {
70 71 define('EXTENDIFY_BASE_URL', plugin_dir_url(__FILE__));
71 72 }
@@ -77,31 +78,8 @@
77 78 $extendify = new Extendify();
78 79 $extendify();
79 80 });
80 81
81 - add_action('update_option', function ($option) {
82 - if (in_array($option, ['WPLANG', 'blogname'], true)) {
83 - \delete_transient('extendify_recommendations');
84 - \delete_transient('extendify_domains');
85 - \delete_transient('extendify_supportArticles');
86 - }
87 -
88 - // Delete the partner transient so we can fetch new data when the locale is switched.
89 - if (($option === 'WPLANG') && get_transient('extendify_partner_data_cache_check')) {
90 - delete_transient('extendify_partner_data_cache_check');
91 - PartnerData::getPartnerData();
92 - }
93 - });
94 -
95 - // Delete the partner transient so we can fetch new data when the locale is switched via WP-CLI.
96 - add_action('cli_init', function () {
97 - $command = sanitize_text_field(wp_unslash(($_SERVER['argv'][1] ?? '')));
98 - if ($command === 'language' && get_transient('extendify_partner_data_cache_check')) {
99 - delete_transient('extendify_partner_data_cache_check');
100 - PartnerData::getPartnerData();
101 - }
102 - });
103 -
104 82 // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed
105 83 add_action('upgrader_process_complete', function ($upgrader, $options) {
106 84 $updatedExtendify = isset($options['plugins']) && array_filter($options['plugins'], function ($plugin) {
107 85 return strpos($plugin, 'extendify') !== false;
@@ -143,17 +121,8 @@
143 121 wp_safe_redirect(admin_url());
144 122 exit;
145 123 }
146 124 });
147 -
148 - // Allow Extendify requests to have a longer timeout.
149 - add_filter('http_request_args', function ($args, $url) {
150 - if (strpos($url, 'extendify') !== false) {
151 - $args['timeout'] = 45;
152 - }
153 -
154 - return $args;
155 - }, 100, 2);
156 125
157 126 // Clean up the site profile if being accessed
158 127 add_filter('option_extendify_site_profile', function ($value) {
159 128 $profile = is_string($value) ? json_decode($value, true) : $value;