@@ 80-90 (lines=11) @@ | ||
77 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
78 | ||
79 | /** This filter is documented in class.jetpack-cli.php */ |
|
80 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
81 | $redirect_uri = add_query_arg( |
|
82 | array( |
|
83 | 'action' => 'jetpack-sso', |
|
84 | 'redirect_to' => rawurlencode( admin_url() ), |
|
85 | ), |
|
86 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
87 | ); |
|
88 | } else { |
|
89 | $redirect_uri = admin_url(); |
|
90 | } |
|
91 | ||
92 | $request_body = array( |
|
93 | 'jp_version' => JETPACK__VERSION, |
@@ 246-256 (lines=11) @@ | ||
243 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
244 | ||
245 | /** This filter is documented in class.jetpack-cli.php */ |
|
246 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
247 | $redirect_uri = add_query_arg( |
|
248 | array( |
|
249 | 'action' => 'jetpack-sso', |
|
250 | 'redirect_to' => rawurlencode( admin_url() ), |
|
251 | ), |
|
252 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
253 | ); |
|
254 | } else { |
|
255 | $redirect_uri = admin_url(); |
|
256 | } |
|
257 | ||
258 | // Generate secrets. |
|
259 | $role = Jetpack::translate_user_to_role( $user ); |