@@ 152-158 (lines=7) @@ | ||
149 | : array(); |
|
150 | ||
151 | $redirect_on_activation_error = ( 'client' === $data['auth_type'] ) ? true : false; |
|
152 | if ( $active_modules = Jetpack_Options::get_option( 'active_modules' ) ) { |
|
153 | Jetpack::delete_active_modules(); |
|
154 | ||
155 | Jetpack::activate_default_modules( 999, 1, array_merge( $active_modules, $other_modules ), $redirect_on_activation_error, false ); |
|
156 | } else { |
|
157 | Jetpack::activate_default_modules( false, false, $other_modules, $redirect_on_activation_error, false ); |
|
158 | } |
|
159 | ||
160 | // Since this is a fresh connection, be sure to clear out IDC options |
|
161 | Jetpack_IDC::clear_all_idc_options(); |
@@ 202-207 (lines=6) @@ | ||
199 | ? array( 'sso' ) |
|
200 | : array(); |
|
201 | ||
202 | if ( $active_modules = Jetpack_Options::get_option( 'active_modules' ) ) { |
|
203 | Jetpack::delete_active_modules(); |
|
204 | Jetpack::activate_default_modules( 999, 1, array_merge( $active_modules, $other_modules ), false ); |
|
205 | } else { |
|
206 | Jetpack::activate_default_modules( false, false, $other_modules, false ); |
|
207 | } |
|
208 | } |
|
209 | ||
210 | private static function verify_token( $access_token ) { |