| @@ 370-380 (lines=11) @@ | ||
| 367 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
| 368 | ||
| 369 | /** This filter is documented in class.jetpack-cli.php */ |
|
| 370 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
| 371 | $redirect_uri = add_query_arg( |
|
| 372 | array( |
|
| 373 | 'action' => 'jetpack-sso', |
|
| 374 | 'redirect_to' => rawurlencode( admin_url() ), |
|
| 375 | ), |
|
| 376 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
| 377 | ); |
|
| 378 | } else { |
|
| 379 | $redirect_uri = admin_url(); |
|
| 380 | } |
|
| 381 | ||
| 382 | // Generate secrets. |
|
| 383 | $roles = new Roles(); |
|
| @@ 77-87 (lines=11) @@ | ||
| 74 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
| 75 | ||
| 76 | /** This filter is documented in class.jetpack-cli.php */ |
|
| 77 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
| 78 | $redirect_uri = add_query_arg( |
|
| 79 | array( |
|
| 80 | 'action' => 'jetpack-sso', |
|
| 81 | 'redirect_to' => rawurlencode( admin_url() ), |
|
| 82 | ), |
|
| 83 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
| 84 | ); |
|
| 85 | } else { |
|
| 86 | $redirect_uri = admin_url(); |
|
| 87 | } |
|
| 88 | ||
| 89 | $request_body = array( |
|
| 90 | 'jp_version' => JETPACK__VERSION, |
|