| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: Patchstack Security |
| 4 | 4 | * Plugin URI: https://patchstack.com |
| 5 | 5 | * Description: Patchstack identifies security vulnerabilities in WordPress plugins, themes, and core. |
| 6 | - * Version: 2.1.25 | |
| 6 | + * Version: 2.1.15 | |
| 7 | 7 | * Author: Patchstack |
| 8 | 8 | * License: GPLv3 |
| 9 | 9 | * Text Domain: patchstack |
| 10 | 10 | * Domain Path: /languages |
| @@ -57,9 +57,9 @@ | ||
| 57 | 57 | * The plugin version. |
| 58 | 58 | * |
| 59 | 59 | * @var string |
| 60 | 60 | */ |
| 61 | - const VERSION = '2.1.25'; | |
| 61 | + const VERSION = '2.1.15'; | |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * API URL of Patchstack to communicate with. |
| 65 | 65 | * |
| @@ -169,13 +169,8 @@ | ||
| 169 | 169 | $this->basename = plugin_basename( __FILE__ ); |
| 170 | 170 | $this->url = plugin_dir_url( __FILE__ ); |
| 171 | 171 | $names = explode( '/', $this->basename ); |
| 172 | 172 | $this->name = $names[0]; |
| 173 | - | |
| 174 | - // Define WP_CLI command. | |
| 175 | - if ( defined( 'WP_CLI' ) && WP_CLI && method_exists('\WP_CLI', 'add_command')) { | |
| 176 | - \WP_CLI::add_command( 'patchstack activate', [ $this, 'cli_activate' ] ); | |
| 177 | - } | |
| 178 | 173 | } |
| 179 | 174 | |
| 180 | 175 | /** |
| 181 | 176 | * Call the constructor of all the Patchstack related classes. |
| @@ -218,39 +213,8 @@ | ||
| 218 | 213 | */ |
| 219 | 214 | public function activate() { |
| 220 | 215 | $this->plugin_classes(); |
| 221 | 216 | $this->activation->activate( $this ); |
| 222 | - } | |
| 223 | - | |
| 224 | - /** | |
| 225 | - * Connects the Patchstack plugin to the API with the license id and secret key. | |
| 226 | - * | |
| 227 | - * Returns an error if the connection was not successful. | |
| 228 | - * | |
| 229 | - * ## OPTIONS | |
| 230 | - * | |
| 231 | - * <id> | |
| 232 | - * : The API client id. | |
| 233 | - * | |
| 234 | - * <secret> | |
| 235 | - * : The API secret key. | |
| 236 | - * | |
| 237 | - * ## EXAMPLES | |
| 238 | - * | |
| 239 | - * $ wp patchstack activate 123456 2b072e8b60402e30d481df351fc08183906254e0 | |
| 240 | - * Success: The Patchstack plugin has been successfully connected. | |
| 241 | - */ | |
| 242 | - public function cli_activate( $args ) { | |
| 243 | - $id = isset( $args[0] ) ? trim( $args[0] ) : ''; | |
| 244 | - $secret = isset( $args[1] ) ? trim( $args[1] ) : ''; | |
| 245 | - | |
| 246 | - $result = $this->activation->alter_license( $id, $secret, 'activate' ); | |
| 247 | - if ( $result['result'] == 'error' ) { | |
| 248 | - \WP_CLI::error( 'The Patchstack plugin could not be connected. Make sure the id and secret key are valid and that api.patchstack.com is not blocked.' ); | |
| 249 | - return; | |
| 250 | - } | |
| 251 | - | |
| 252 | - \WP_CLI::success( 'The Patchstack plugin has been successfully connected.' ); | |
| 253 | 217 | } |
| 254 | 218 | |
| 255 | 219 | /** |
| 256 | 220 | * Deactivate the plugin. |