PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 14.2
Jetpack – WP Security, Backup, Speed, & Growth v14.2
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
← All changes | class.jetpack-cli.php +7 -8 13.4.514.2 View file →
@@ -22,8 +22,9 @@
22 22 if ( ! class_exists( 'WP_CLI_Command' ) ) {
23 23 return;
24 24 }
25 25
26 +// @phan-suppress-next-line PhanUndeclaredFunctionInCallable -- https://github.com/phan/phan/issues/4763
26 27 WP_CLI::add_command( 'jetpack', 'Jetpack_CLI' );
27 28
28 29 /**
29 30 * Control your local Jetpack installation.
@@ -984,10 +985,10 @@
984 985 if ( $status->is_offline_mode() ) {
985 986 WP_CLI::error( __( 'Jetpack sync is not currently allowed for this site. The site is in offline mode.', 'jetpack' ) );
986 987 return;
987 988 }
988 - if ( $status->is_staging_site() ) {
989 - WP_CLI::error( __( 'Jetpack sync is not currently allowed for this site. The site is in staging mode.', 'jetpack' ) );
989 + if ( $status->in_safe_mode() ) {
990 + WP_CLI::error( __( 'Jetpack sync is not currently allowed for this site. The site is in safe mode.', 'jetpack' ) );
990 991 return;
991 992 }
992 993 }
993 994 // Get the original settings so that we can restore them later.
@@ -1072,9 +1073,9 @@
1072 1073 WP_CLI::log( __( 'Sent more data to WordPress.com', 'jetpack' ) );
1073 1074 }
1074 1075
1075 1076 // Immediate Full Sync does not wait for WP.com to process data so we need to enforce a wait.
1076 - if ( str_contains( get_class( Modules::get_module( 'full-sync' ) ), 'Full_Sync_Immediately' ) ) {
1077 + if ( Modules::get_module( 'full-sync' ) instanceof \Automattic\Jetpack\Sync\Modules\Full_Sync_Immediately ) {
1077 1078 sleep( 15 );
1078 1079 }
1079 1080 }
1080 1081 ++$i;
@@ -1218,10 +1219,8 @@
1218 1219 }
1219 1220
1220 1221 $result = Client::_wp_remote_request( $url, $request );
1221 1222
1222 - Jetpack_Options::delete_option( 'onboarding' );
1223 -
1224 1223 if ( is_wp_error( $result ) ) {
1225 1224 $this->partner_provision_error( $result );
1226 1225 }
1227 1226
@@ -1242,10 +1241,8 @@
1242 1241 * [--wpcom_user_id=<user_id>]
1243 1242 * : WordPress.com ID of user to connect as (must be whitelisted against partner key)
1244 1243 * [--wpcom_user_email=<wpcom_user_email>]
1245 1244 * : Override the email we send to WordPress.com for registration
1246 - * [--onboarding=<onboarding>]
1247 - * : Guide the user through an onboarding wizard
1248 1245 * [--force_register=<register>]
1249 1246 * : Whether to force a site to register
1250 1247 * [--force_connect=<force_connect>]
1251 1248 * : Force JPS to not reuse existing credentials
@@ -1260,9 +1257,9 @@
1260 1257 *
1261 1258 * $ wp jetpack partner_provision '{ some: "json" }' premium 1
1262 1259 * { success: true }
1263 1260 *
1264 - * @synopsis <token_json> [--wpcom_user_id=<user_id>] [--plan=<plan_name>] [--onboarding=<onboarding>] [--force_register=<register>] [--force_connect=<force_connect>] [--home_url=<home_url>] [--site_url=<site_url>] [--wpcom_user_email=<wpcom_user_email>] [--partner_tracking_id=<partner_tracking_id>]
1261 + * @synopsis <token_json> [--wpcom_user_id=<user_id>] [--plan=<plan_name>] [--force_register=<register>] [--force_connect=<force_connect>] [--home_url=<home_url>] [--site_url=<site_url>] [--wpcom_user_email=<wpcom_user_email>] [--partner_tracking_id=<partner_tracking_id>]
1265 1262 *
1266 1263 * @param array $args Positional args.
1267 1264 * @param array $named_args Named args.
1268 1265 */
@@ -1865,11 +1862,13 @@
1865 1862 )
1866 1863 );
1867 1864 }
1868 1865
1866 + // @phan-suppress-next-line PhanUndeclaredClassMethod - Class is missing from php-stubs/wp-cli-stubs 🤷
1869 1867 $progress->tick();
1870 1868 }
1871 1869
1870 + // @phan-suppress-next-line PhanUndeclaredClassMethod - Class is missing from php-stubs/wp-cli-stubs 🤷
1872 1871 $progress->finish();
1873 1872
1874 1873 if ( 'all' === $service ) {
1875 1874 WP_CLI::success( __( 'All Jetpack Social connections were successfully disconnected.', 'jetpack' ) );