@@ 4479-4489 (lines=11) @@ | ||
4476 | self::activate_default_modules( $min_version, $max_version, $other_modules ); |
|
4477 | wp_safe_redirect( self::admin_url( 'page=jetpack' ) ); |
|
4478 | exit; |
|
4479 | case 'disconnect': |
|
4480 | if ( ! current_user_can( 'jetpack_disconnect' ) ) { |
|
4481 | $error = 'cheatin'; |
|
4482 | break; |
|
4483 | } |
|
4484 | ||
4485 | check_admin_referer( 'jetpack-disconnect' ); |
|
4486 | self::log( 'disconnect' ); |
|
4487 | self::disconnect(); |
|
4488 | wp_safe_redirect( self::admin_url( 'disconnected=true' ) ); |
|
4489 | exit; |
|
4490 | case 'reconnect': |
|
4491 | if ( ! current_user_can( 'jetpack_reconnect' ) ) { |
|
4492 | $error = 'cheatin'; |
|
@@ 4490-4500 (lines=11) @@ | ||
4487 | self::disconnect(); |
|
4488 | wp_safe_redirect( self::admin_url( 'disconnected=true' ) ); |
|
4489 | exit; |
|
4490 | case 'reconnect': |
|
4491 | if ( ! current_user_can( 'jetpack_reconnect' ) ) { |
|
4492 | $error = 'cheatin'; |
|
4493 | break; |
|
4494 | } |
|
4495 | ||
4496 | check_admin_referer( 'jetpack-reconnect' ); |
|
4497 | self::log( 'reconnect' ); |
|
4498 | self::disconnect(); |
|
4499 | wp_redirect( $this->build_connect_url( true, false, 'reconnect' ) ); |
|
4500 | exit; |
|
4501 | case 'deactivate': |
|
4502 | if ( ! current_user_can( 'jetpack_deactivate_modules' ) ) { |
|
4503 | $error = 'cheatin'; |