PluginProbe
RabbitLoader / 2.17.6
RabbitLoader v2.17.6
4.0.2 4.0.1 4.0 3.2.0 3.1.1 3.1.0 3.0.5 3.0.3 3.0.4 2.17.1 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.7 2.18.0 2.18.1 2.18.2 2.18.3 2.18.4 2.18.5 2.18.6 2.18.7 2.18.8 All 129 releases
rabbit-loader / wp-cli.php

wp-cli.php in RabbitLoader 2.17.6, at wp-cli.php

31 lines 818 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) or die( 'No jokes please!' );
4
5 /**
6 * Activate RabbitLoader cloud services
7 *
8 * ## OPTIONS
9 *
10 * <ApiKey>
11 * : Your API key, can be obtained from profile page https://rabbitloader.com/account/#apikeys
12 *
13 * <ApiSecret>
14 * : Your API secret, can be obtained from profile page https://rabbitloader.com/account/#apikeys
15 *
16 * ## EXAMPLE
17 *
18 * wp rabbitloader connect ApiKey ApiSecret
19 */
20
21 function cli_rabbitloader_connect($args, $assoc_args) {
22 $apikey = !empty($args[0]) ? $args[0] : "";
23 $apisecret = !empty($args[1]) ? $args[1] : "";
24 $urlparts = parse_url(home_url());
25 if(!empty($apikey) && !empty($apisecret)){
26 RabbitLoader_21_Core::update_auth_keys($apikey, $apisecret, $urlparts['host'], '');
27 }
28 }
29
30 WP_CLI::add_command("rabbitloader connect", "cli_rabbitloader_connect");
31 ?>