Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various: Ensure WP CLI is defined before extending #23207

Merged
merged 2 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions projects/packages/search/changelog/update-cli-classes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Ensure that WP CLI is present before extending the class.
2 changes: 1 addition & 1 deletion projects/packages/search/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jetpack-search",
"version": "0.10.0",
"version": "0.10.1-alpha",
"description": "Package for Jetpack Search products",
"main": "main.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/search/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Automattic\Jetpack\Search;

define( 'JETPACK_SEARCH_PKG__VERSION', '0.10.0' );
define( 'JETPACK_SEARCH_PKG__VERSION', '0.10.1-alpha' );
define( 'JETPACK_SEARCH_PKG__DIR', __DIR__ . '/' );
define( 'JETPACK_SEARCH_PKG__SLUG', 'search' );

Expand Down
4 changes: 4 additions & 0 deletions projects/packages/search/src/class-cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
use \WP_CLI_Command;
use \WP_Error;

if ( ! class_exists( 'WP_CLI_Command' ) ) {
return;
}

/**
* Provide functionality by WPCLI.
*/
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/beta/changelog/update-cli-classes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Ensure that WP CLI is present before extending the class.
4 changes: 4 additions & 0 deletions projects/plugins/beta/src/class-clicommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
use WP_CLI;
use WP_CLI_Command;

if ( ! class_exists( 'WP_CLI_Command' ) ) {
return;
}

/**
* Control your local Jetpack Beta Tester plugin.
*/
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/update-cli-classes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: compat

Ensure WP CLI is present before extending the class.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/class.jetpack-cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
use Automattic\Jetpack\Sync\Queue;
use Automattic\Jetpack\Sync\Settings;

if ( ! class_exists( 'WP_CLI_Command' ) ) {
return;
}

WP_CLI::add_command( 'jetpack', 'Jetpack_CLI' );

/**
Expand Down