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