@@ 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, |
@@ 245-255 (lines=11) @@ | ||
242 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
243 | ||
244 | /** This filter is documented in class.jetpack-cli.php */ |
|
245 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
246 | $redirect_uri = add_query_arg( |
|
247 | array( |
|
248 | 'action' => 'jetpack-sso', |
|
249 | 'redirect_to' => rawurlencode( admin_url() ), |
|
250 | ), |
|
251 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
252 | ); |
|
253 | } else { |
|
254 | $redirect_uri = admin_url(); |
|
255 | } |
|
256 | ||
257 | // Generate secrets. |
|
258 | $role = Jetpack::translate_user_to_role( $user ); |