@@ 4455-4465 (lines=11) @@ | ||
4452 | self::activate_default_modules( $min_version, $max_version, $other_modules ); |
|
4453 | wp_safe_redirect( self::admin_url( 'page=jetpack' ) ); |
|
4454 | exit; |
|
4455 | case 'disconnect': |
|
4456 | if ( ! current_user_can( 'jetpack_disconnect' ) ) { |
|
4457 | $error = 'cheatin'; |
|
4458 | break; |
|
4459 | } |
|
4460 | ||
4461 | check_admin_referer( 'jetpack-disconnect' ); |
|
4462 | self::log( 'disconnect' ); |
|
4463 | self::disconnect(); |
|
4464 | wp_safe_redirect( self::admin_url( 'disconnected=true' ) ); |
|
4465 | exit; |
|
4466 | case 'reconnect': |
|
4467 | if ( ! current_user_can( 'jetpack_reconnect' ) ) { |
|
4468 | $error = 'cheatin'; |
|
@@ 4466-4476 (lines=11) @@ | ||
4463 | self::disconnect(); |
|
4464 | wp_safe_redirect( self::admin_url( 'disconnected=true' ) ); |
|
4465 | exit; |
|
4466 | case 'reconnect': |
|
4467 | if ( ! current_user_can( 'jetpack_reconnect' ) ) { |
|
4468 | $error = 'cheatin'; |
|
4469 | break; |
|
4470 | } |
|
4471 | ||
4472 | check_admin_referer( 'jetpack-reconnect' ); |
|
4473 | self::log( 'reconnect' ); |
|
4474 | self::disconnect(); |
|
4475 | wp_redirect( $this->build_connect_url( true, false, 'reconnect' ) ); |
|
4476 | exit; |
|
4477 | case 'deactivate': |
|
4478 | if ( ! current_user_can( 'jetpack_deactivate_modules' ) ) { |
|
4479 | $error = 'cheatin'; |