PluginProbe
CryptX / 4.2.1
CryptX v4.2.1
4.2.1 4.2.0 4.1.1 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.9 2.0 2.1 2.2 2.3 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 All 93 releases
← All changes | cryptx.php +23 -3 4.1.14.2.1 View file →
@@ -2,11 +2,11 @@
2 2 /**
3 3 * Plugin Name: CryptX
4 4 * Plugin URI: https://wordpress.org/plugins/cryptx/
5 5 * Description: CryptX encrypts email addresses in your posts, pages, comments, and text widgets to protect them from spam bots while keeping them readable for your visitors.
6 - * Version: 4.1.1
6 + * Version: 4.2.1
7 7 * Requires at least: 6.7
8 - * Tested up to: 7.0
8 + * Tested up to: 7.1
9 9 * Requires PHP: 8.1
10 10 * Author: Ralf Weber
11 11 * Author URI: https://weber-nrw.de/
12 12 * License: GPL v2 or later
@@ -35,9 +35,9 @@
35 35 exit;
36 36 }
37 37
38 38 // Plugin constants
39 -define('CRYPTX_VERSION', '4.1.1');
39 +define('CRYPTX_VERSION', '4.2.1');
40 40 define('CRYPTX_PLUGIN_FILE', __FILE__);
41 41 define('CRYPTX_PLUGIN_BASENAME', plugin_basename(__FILE__));
42 42 define('CRYPTX_BASENAME', plugin_basename(__FILE__)); // Add this missing constant
43 43 define('CRYPTX_DIR_PATH', plugin_dir_path(__FILE__));
@@ -138,11 +138,16 @@
138 138 $requiredClasses = [
139 139 'CryptX\\CryptX',
140 140 'CryptX\\Config',
141 141 'CryptX\\SecureEncryption',
142 + 'CryptX\\Exposure',
143 + 'CryptX\\Block',
144 + 'CryptX\\ImageToken',
145 + 'CryptX\\Admin\\NetworkDefaults',
142 146 'CryptX\\Admin\\SettingsPage',
143 147 'CryptX\\Admin\\SettingsSchema',
144 148 'CryptX\\Admin\\RestController',
149 + 'CryptX\\Admin\\SiteHealth',
145 150 ];
146 151
147 152 $missingClasses = [];
148 153 foreach ($requiredClasses as $class) {
@@ -162,8 +167,23 @@
162 167 try {
163 168 $cryptx_instance = CryptX\CryptX::get_instance();
164 169 $cryptx_instance->startCryptX();
165 170 cryptx_register_action_links();
171 +
172 + // Guarded here as well as inside register(), and deliberately not
173 + // listed in $requiredClasses above. Both of those would load the file
174 + // on every single front-end and admin request -- class_exists() runs
175 + // the autoloader, and so does a static call -- to register commands
176 + // that only exist under WP-CLI.
177 + //
178 + // class_exists() is still asked so that a package missing the file
179 + // cannot raise a fatal Error, which catch (Exception) below would not
180 + // have caught. It buys no notice: the commands are then simply absent.
181 + // That is the right silence -- nothing a visitor or an administrator
182 + // sees depends on them.
183 + if (defined('WP_CLI') && WP_CLI && class_exists('CryptX\Cli')) {
184 + CryptX\Cli::register();
185 + }
166 186 } catch (Exception $e) {
167 187 cryptx_admin_notice(
168 188 __('CryptX initialization failed: ', 'cryptx') . $e->getMessage()
169 189 );