| @@ 73-83 (lines=11) @@ | ||
| 70 | $auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
| 71 | ||
| 72 | /** This filter is documented in class.jetpack-cli.php */ |
|
| 73 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
| 74 | $redirect_uri = add_query_arg( |
|
| 75 | array( |
|
| 76 | 'action' => 'jetpack-sso', |
|
| 77 | 'redirect_to' => rawurlencode( admin_url() ), |
|
| 78 | ), |
|
| 79 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
| 80 | ); |
|
| 81 | } else { |
|
| 82 | $redirect_uri = admin_url(); |
|
| 83 | } |
|
| 84 | ||
| 85 | $request_body = array( |
|
| 86 | 'jp_version' => JETPACK__VERSION, |
|
| @@ 392-402 (lines=11) @@ | ||
| 389 | $auto_enable_sso = ( ! $this->connection->is_active() || Jetpack::is_module_active( 'sso' ) ); |
|
| 390 | ||
| 391 | /** This filter is documented in class.jetpack-cli.php */ |
|
| 392 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
| 393 | $redirect_uri = add_query_arg( |
|
| 394 | array( |
|
| 395 | 'action' => 'jetpack-sso', |
|
| 396 | 'redirect_to' => rawurlencode( admin_url() ), |
|
| 397 | ), |
|
| 398 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
| 399 | ); |
|
| 400 | } else { |
|
| 401 | $redirect_uri = admin_url(); |
|
| 402 | } |
|
| 403 | ||
| 404 | // Generate secrets. |
|
| 405 | $roles = new Roles(); |
|