diff --git a/jetpack-start.php b/jetpack-start.php
index bac0fce..51befde 100644
--- a/jetpack-start.php
+++ b/jetpack-start.php
@@ -8,6 +8,9 @@
define( 'JETPACK_START_BASE_DIR', dirname( __FILE__ ) );
define( 'JETPACK_START_BASE_URL', plugins_url( 'jetpack-start', dirname( __FILE__ ) ) );
+define( 'JETPACK_STEP_AUTO_REDIRECT', true );
+define( 'JETPACK_STEP_AUTO_REDIRECT_SRC', 'custom_src' );
+
function jps_start() {
if (current_user_can_for_blog( get_current_blog_id(), 'switch_themes' ) ) {
diff --git a/js/jetpack-start.js b/js/jetpack-start.js
index b726cb8..a35cee0 100644
--- a/js/jetpack-start.js
+++ b/js/jetpack-start.js
@@ -65,8 +65,9 @@ var jetpackStartWizard = new ( Backbone.View.extend({
},
render: function() {
- this.clear();
var currentStepView = this.currentStep().getView();
+ currentStepView.beforeRender();
+ this.clear();
jQuery( 'body' ).append( currentStepView.render().delegateEvents().el );
currentStepView.afterRender();
this.renderProgress();
@@ -112,6 +113,8 @@ var JetpackStartStepView = Backbone.View.extend({
return this;
},
+ beforeRender: function() {},
+
afterRender: function() {},
goToNextStep: function( event ) {
diff --git a/steps/connect-jetpack.php b/steps/connect-jetpack.php
index 2cbb497..049d6f0 100644
--- a/steps/connect-jetpack.php
+++ b/steps/connect-jetpack.php
@@ -8,6 +8,7 @@
// Get out of the middle of the Jetpack - Wordpress.com handshake.
if ( isset( $_GET['page'] ) && $_GET['page'] == 'jetpack' && isset( $_GET['action'] ) && ( $_GET['action'] == 'register' || $_GET['action'] == 'authorize' ) ) {
add_filter( 'jetpack_start_render_wizard', '__return_false' );
+ set_transient( 'jetpack_tried_to_connect', true, HOUR_IN_SECONDS );
}
class Jetpack_Start_Step_connect_jetpack extends Jetpack_Start_Step {
@@ -18,7 +19,4 @@ function __construct() {
}
}
- function get_jetpack() {
- return Jetpack::init();
- }
}
diff --git a/views/steps/connect-jetpack.php b/views/steps/connect-jetpack.php
index ee31fa9..51e8926 100644
--- a/views/steps/connect-jetpack.php
+++ b/views/steps/connect-jetpack.php
@@ -1,4 +1,5 @@