| Server IP : 178.212.43.201 / Your IP : 10.100.0.33 Web Server : Apache/2.4.37 (Oracle Linux Server) OpenSSL/1.1.1k System : Linux spa0007.srv.paxillus.pl 5.4.17-2136.355.3.1.el8uek.x86_64 #3 SMP Sat May 9 17:11:55 PDT 2026 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/paxillus/wp-content/plugins/updraftplus/udaddons/ |
Upload File : |
<?php
if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed');
if (!defined('WP_CLI') || !WP_CLI || !class_exists('WP_CLI_Command')) return;
/**
* Implements Updraftplus CLI all commands
*/
class UpdraftPlus_CLI_Command_Base extends WP_CLI_Command {
/**
* Register UpdraftPlus product key
*
* ## OPTIONS
*
* <product_key>
* : The product key
*
* ## EXAMPLES
*
* wp updraftplus register_product_key A1B2C3D4E5F6G7H8I
*
* @when after_wp_load
*
* @param Array $args A indexed array of command line arguments
*/
public function register_product_key($args) {
if (empty($args[0])) WP_CLI::error(__("Missing parameter", 'updraftplus'));
$product_key = sanitize_text_field($args[0]);
$product_key_meta = array(
'registered_at' => time(),
'site_url' => network_site_url(),
);
update_site_option('updraftplus_product_key', $product_key);
update_site_option('updraftplus_product_key_meta', $product_key_meta);
WP_CLI::success(__("The product key has been registered successfully.", 'updraftplus'));
}
}