PluginProbe
Migrate to WordPress.com / trunk
Migrate to WordPress.com vtrunk
6.72 6.65 trunk 5.72 5.81 5.88
wpcom-migration / wp_cli.php

wp_cli.php in Migrate to WordPress.com trunk, at wp_cli.php

30 lines 688 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) exit;
3 if (!class_exists('WPCOMWPCli')) :
4
5 require_once dirname( __FILE__ ) . '/recover.php';
6
7 class WPCOMWPCli {
8 public $settings;
9 public $siteinfo;
10 public $bvinfo;
11 public $bvapi;
12
13 public function __construct($settings, $bvinfo, $bvsiteinfo, $bvapi) {
14 $this->settings = $settings;
15 $this->siteinfo = $bvsiteinfo;
16 $this->bvinfo = $bvinfo;
17 $this->bvapi = $bvapi;
18 }
19
20 public function get_connection_key() {
21 WP_CLI::line($this->bvinfo->getConnectionKey());
22 }
23
24 public function refresh_connection_key() {
25 WPCOMRecover::refreshDefaultSecret($this->settings);
26 WP_CLI::success('Key Refreshed Successfully.');
27 }
28
29 }
30 endif;