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