Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/google-site-kit/includes/Core/CLI/CLI_Commands.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 + /**
3 + * Class Google\Site_Kit\Core\CLI\CLI_Commands
4 + *
5 + * @package Google\Site_Kit\Core\CLI
6 + * @copyright 2021 Google LLC
7 + * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
8 + * @link https://sitekit.withgoogle.com
9 + */
10 +
11 + namespace Google\Site_Kit\Core\CLI;
12 +
13 + use Google\Site_Kit\Context;
14 + use WP_CLI;
15 +
16 + /**
17 + * CLI commands hub class.
18 + *
19 + * @since 1.11.0
20 + * @access private
21 + * @ignore
22 + */
23 + class CLI_Commands {
24 +
25 + /**
26 + * Plugin context.
27 + *
28 + * @since 1.11.0
29 + *
30 + * @var Context
31 + */
32 + private $context;
33 +
34 + /**
35 + * Constructor.
36 + *
37 + * @since 1.11.0
38 + *
39 + * @param Context $context Plugin context.
40 + */
41 + public function __construct( Context $context ) {
42 + $this->context = $context;
43 + }
44 +
45 + /**
46 + * Registers WP CLI commands.
47 + *
48 + * @since 1.11.0
49 + */
50 + public function register() {
51 + WP_CLI::add_command( 'google-site-kit auth', new Authentication_CLI_Command( $this->context ) );
52 + WP_CLI::add_command( 'google-site-kit reset', new Reset_CLI_Command( $this->context ) );
53 + }
54 + }
55 +