| @@ -3,14 +3,14 @@ | ||
| 3 | 3 | * Plugin Name: Patchstack Security |
| 4 | 4 | * Plugin URI: https://patchstack.com/?utm_medium=wp&utm_source=dashboard&utm_campaign=patchstack%20plugin |
| 5 | 5 | * Author URI: https://patchstack.com/?utm_medium=wp&utm_source=dashboard&utm_campaign=patchstack%20plugin |
| 6 | 6 | * Description: Patchstack identifies security vulnerabilities in WordPress plugins, themes, and core. |
| 7 | - * Version: 2.3.7 | |
| 7 | + * Version: 2.3.4 | |
| 8 | 8 | * Author: Patchstack |
| 9 | 9 | * License: GPLv3 |
| 10 | 10 | * Text Domain: patchstack |
| 11 | 11 | * Domain Path: /languages |
| 12 | - * Requires at least: 5.2 | |
| 12 | + * Requires at least: 4.4 | |
| 13 | 13 | * Requires PHP: 5.6 |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | 16 | // Do not allow the file to be called directly. |
| @@ -58,9 +58,9 @@ | ||
| 58 | 58 | * The plugin version. |
| 59 | 59 | * |
| 60 | 60 | * @var string |
| 61 | 61 | */ |
| 62 | - const VERSION = '2.3.7'; | |
| 62 | + const VERSION = '2.3.4'; | |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * API URL of Patchstack to communicate with. |
| 66 | 66 | * |
| @@ -173,10 +173,8 @@ | ||
| 173 | 173 | |
| 174 | 174 | // Define WP_CLI command. |
| 175 | 175 | if ( defined( 'WP_CLI' ) && WP_CLI && method_exists('\WP_CLI', 'add_command')) { |
| 176 | 176 | \WP_CLI::add_command( 'patchstack activate', [ $this, 'cli_activate' ] ); |
| 177 | - \WP_CLI::add_command( 'patchstack deactivate', [ $this, 'cli_deactivate' ] ); | |
| 178 | - \WP_CLI::add_command( 'patchstack status', [ $this, 'cli_status' ] ); | |
| 179 | 177 | } |
| 180 | 178 | } |
| 181 | 179 | |
| 182 | 180 | /** |
| @@ -231,22 +229,22 @@ | ||
| 231 | 229 | * ## OPTIONS |
| 232 | 230 | * |
| 233 | 231 | * [<id>] |
| 234 | 232 | * : The API client id. |
| 235 | - * | |
| 233 | + * | |
| 236 | 234 | * [<secret>] |
| 237 | 235 | * : The API secret key. |
| 238 | - * | |
| 236 | + * | |
| 239 | 237 | * <secret-id> |
| 240 | 238 | * : The API client id and secret key merged together, found in the App. E.g. 2b072e8b60402e30d481df351fc08183906254e0-123456 |
| 241 | - * | |
| 239 | + * | |
| 242 | 240 | * ## EXAMPLES |
| 243 | - * | |
| 241 | + * | |
| 244 | 242 | * $ wp patchstack activate 123456 2b072e8b60402e30d481df351fc08183906254e0 |
| 245 | 243 | * Success: The Patchstack plugin has been successfully connected. |
| 246 | - * | |
| 244 | + * | |
| 247 | 245 | * or |
| 248 | - * | |
| 246 | + * | |
| 249 | 247 | * $ wp patchstack activate 2b072e8b60402e30d481df351fc08183906254e0-123456 |
| 250 | 248 | * Success: The Patchstack plugin has been successfully connected. |
| 251 | 249 | */ |
| 252 | 250 | public function cli_activate( $args ) { |
| @@ -267,42 +265,8 @@ | ||
| 267 | 265 | \WP_CLI::success( 'The Patchstack plugin has been successfully connected.' ); |
| 268 | 266 | } |
| 269 | 267 | |
| 270 | 268 | /** |
| 271 | - * Disconnects the Patchstack plugin from the API and removes the API key. | |
| 272 | - * | |
| 273 | - * ## EXAMPLES | |
| 274 | - * | |
| 275 | - * $ wp patchstack deactivate | |
| 276 | - * Success: The Patchstack plugin has been successfully disconnected. | |
| 277 | - */ | |
| 278 | - public function cli_deactivate() { | |
| 279 | - $this->activation->deactivate(); | |
| 280 | - $this->activation->alter_license( '', '', 'deactivate' ); | |
| 281 | - | |
| 282 | - \WP_CLI::success( 'The Patchstack plugin has been successfully disconnected.' ); | |
| 283 | - } | |
| 284 | - | |
| 285 | - /** | |
| 286 | - * Gets the current API connection status from the Patchstack plugin. | |
| 287 | - * | |
| 288 | - * ## EXAMPLES | |
| 289 | - * | |
| 290 | - * $ wp patchstack status | |
| 291 | - * Success: The Patchstack plugin is currently connected to the API. | |
| 292 | - * | |
| 293 | - * $ wp patchstack status | |
| 294 | - * Warning: The Patchstack plugin is not connected to the API. | |
| 295 | - */ | |
| 296 | - public function cli_status() { | |
| 297 | - if ( $this->api->is_connected() ) { | |
| 298 | - \WP_CLI::success( __( 'The Patchstack plugin is currently connected to the API.', 'patchstack' ) ); | |
| 299 | - } else { | |
| 300 | - \WP_CLI::warning( __( 'The Patchstack plugin is not connected to the API.', 'patchstack' ) ); | |
| 301 | - } | |
| 302 | - } | |
| 303 | - | |
| 304 | - /** | |
| 305 | 269 | * Deactivate the plugin. |
| 306 | 270 | * |
| 307 | 271 | * @return void |
| 308 | 272 | */ |
| @@ -312,9 +276,9 @@ | ||
| 312 | 276 | } |
| 313 | 277 | |
| 314 | 278 | /** |
| 315 | 279 | * Load translated strings for the plugin. |
| 316 | - * | |
| 280 | + * | |
| 317 | 281 | * @return void |
| 318 | 282 | */ |
| 319 | 283 | public function load_textdomain () { |
| 320 | 284 | load_plugin_textdomain( 'patchstack', false, dirname( $this->basename ) . '/languages/' ); |
| @@ -437,13 +401,11 @@ | ||
| 437 | 401 | return patchstack::get_instance(); |
| 438 | 402 | } |
| 439 | 403 | } |
| 440 | 404 | |
| 441 | -if ( ! has_action( 'plugins_loaded', [ patchstack(), 'init' ] ) ) { | |
| 442 | - // Kick it off. | |
| 443 | - add_action( 'plugins_loaded', [ patchstack(), 'init' ] ); | |
| 405 | +// Kick it off. | |
| 406 | +add_action( 'plugins_loaded', [ patchstack(), 'init' ] ); | |
| 444 | 407 | |
| 445 | - // Activation and deactivation hooks. | |
| 446 | - register_activation_hook( __FILE__, [ patchstack(), 'activate' ] ); | |
| 447 | - register_deactivation_hook( __FILE__, [ patchstack(), 'deactivate' ] ); | |
| 448 | - register_uninstall_hook( __FILE__, 'patchstack_uninstall' ); | |
| 449 | -} | |
| 408 | +// Activation and deactivation hooks. | |
| 409 | +register_activation_hook( __FILE__, [ patchstack(), 'activate' ] ); | |
| 410 | +register_deactivation_hook( __FILE__, [ patchstack(), 'deactivate' ] ); | |
| 411 | +register_uninstall_hook( __FILE__, 'patchstack_uninstall' ); | |