@@ 4437-4447 (lines=11) @@ | ||
4434 | self::activate_default_modules( $min_version, $max_version, $other_modules ); |
|
4435 | wp_safe_redirect( self::admin_url( 'page=jetpack' ) ); |
|
4436 | exit; |
|
4437 | case 'disconnect': |
|
4438 | if ( ! current_user_can( 'jetpack_disconnect' ) ) { |
|
4439 | $error = 'cheatin'; |
|
4440 | break; |
|
4441 | } |
|
4442 | ||
4443 | check_admin_referer( 'jetpack-disconnect' ); |
|
4444 | self::log( 'disconnect' ); |
|
4445 | self::disconnect(); |
|
4446 | wp_safe_redirect( self::admin_url( 'disconnected=true' ) ); |
|
4447 | exit; |
|
4448 | case 'reconnect': |
|
4449 | if ( ! current_user_can( 'jetpack_reconnect' ) ) { |
|
4450 | $error = 'cheatin'; |
|
@@ 4448-4458 (lines=11) @@ | ||
4445 | self::disconnect(); |
|
4446 | wp_safe_redirect( self::admin_url( 'disconnected=true' ) ); |
|
4447 | exit; |
|
4448 | case 'reconnect': |
|
4449 | if ( ! current_user_can( 'jetpack_reconnect' ) ) { |
|
4450 | $error = 'cheatin'; |
|
4451 | break; |
|
4452 | } |
|
4453 | ||
4454 | check_admin_referer( 'jetpack-reconnect' ); |
|
4455 | self::log( 'reconnect' ); |
|
4456 | self::disconnect(); |
|
4457 | wp_redirect( $this->build_connect_url( true, false, 'reconnect' ) ); |
|
4458 | exit; |
|
4459 | case 'deactivate': |
|
4460 | if ( ! current_user_can( 'jetpack_deactivate_modules' ) ) { |
|
4461 | $error = 'cheatin'; |