@@ 81-91 (lines=11) @@ | ||
78 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
79 | ||
80 | /** This filter is documented in class.jetpack-cli.php */ |
|
81 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
82 | $redirect_uri = add_query_arg( |
|
83 | array( |
|
84 | 'action' => 'jetpack-sso', |
|
85 | 'redirect_to' => rawurlencode( admin_url() ), |
|
86 | ), |
|
87 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
88 | ); |
|
89 | } else { |
|
90 | $redirect_uri = admin_url(); |
|
91 | } |
|
92 | ||
93 | $request_body = array( |
|
94 | 'jp_version' => JETPACK__VERSION, |
@@ 321-331 (lines=11) @@ | ||
318 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
319 | ||
320 | /** This filter is documented in class.jetpack-cli.php */ |
|
321 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
322 | $redirect_uri = add_query_arg( |
|
323 | array( |
|
324 | 'action' => 'jetpack-sso', |
|
325 | 'redirect_to' => rawurlencode( admin_url() ), |
|
326 | ), |
|
327 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
328 | ); |
|
329 | } else { |
|
330 | $redirect_uri = admin_url(); |
|
331 | } |
|
332 | ||
333 | // Generate secrets. |
|
334 | $role = Jetpack::translate_user_to_role( $user ); |