diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2017-12-26 04:11:05 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2017-12-26 04:11:05 -0500 |
commit | f538c47c8f75b9cc9b8665f6312e94ec0bf4adb4 (patch) | |
tree | d4c8ac61edade1aba1b356a67d9089e1af0670f1 /plugins/jetpack/class.jetpack.php | |
parent | Update jetpack 5.6 (diff) | |
download | blogs-gentoo-f538c47c8f75b9cc9b8665f6312e94ec0bf4adb4.tar.gz blogs-gentoo-f538c47c8f75b9cc9b8665f6312e94ec0bf4adb4.tar.bz2 blogs-gentoo-f538c47c8f75b9cc9b8665f6312e94ec0bf4adb4.zip |
Update jetpack 5.6.1
Diffstat (limited to 'plugins/jetpack/class.jetpack.php')
-rw-r--r-- | plugins/jetpack/class.jetpack.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/jetpack/class.jetpack.php b/plugins/jetpack/class.jetpack.php index 0be43943..309d781f 100644 --- a/plugins/jetpack/class.jetpack.php +++ b/plugins/jetpack/class.jetpack.php @@ -4032,6 +4032,20 @@ p { wp_safe_redirect( Jetpack::admin_url( array( 'page' => $redirect ) ) ); } exit; + case 'onboard' : + if ( ! current_user_can( 'manage_options' ) ) { + wp_safe_redirect( Jetpack::admin_url( 'page=jetpack' ) ); + } else { + Jetpack::create_onboarding_token(); + $url = $this->build_connect_url( true ); + $calypso_env = ! empty( $_GET[ 'calypso_env' ] ) ? $_GET[ 'calypso_env' ] : false; + if ( $calypso_env ) { + $url = add_query_arg( 'calypso_env', $calypso_env, $url ); + } + wp_redirect( $url ); + exit; + } + exit; default: /** * Fires when a Jetpack admin page is loaded with an unrecognized parameter. |