@@ 78-88 (lines=11) @@ | ||
75 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
76 | ||
77 | /** This filter is documented in class.jetpack-cli.php */ |
|
78 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
79 | $redirect_uri = add_query_arg( |
|
80 | array( |
|
81 | 'action' => 'jetpack-sso', |
|
82 | 'redirect_to' => rawurlencode( admin_url() ), |
|
83 | ), |
|
84 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
85 | ); |
|
86 | } else { |
|
87 | $redirect_uri = admin_url(); |
|
88 | } |
|
89 | ||
90 | $request_body = array( |
|
91 | 'jp_version' => JETPACK__VERSION, |
@@ 312-322 (lines=11) @@ | ||
309 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
310 | ||
311 | /** This filter is documented in class.jetpack-cli.php */ |
|
312 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
313 | $redirect_uri = add_query_arg( |
|
314 | array( |
|
315 | 'action' => 'jetpack-sso', |
|
316 | 'redirect_to' => rawurlencode( admin_url() ), |
|
317 | ), |
|
318 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
319 | ); |
|
320 | } else { |
|
321 | $redirect_uri = admin_url(); |
|
322 | } |
|
323 | ||
324 | // Generate secrets. |
|
325 | $role = Jetpack::translate_user_to_role( $user ); |