@@ 76-86 (lines=11) @@ | ||
73 | $auto_enable_sso = ( ! Jetpack::connection()->has_connected_owner() || Jetpack::is_module_active( 'sso' ) ); |
|
74 | ||
75 | /** This filter is documented in class.jetpack-cli.php */ |
|
76 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
77 | $redirect_uri = add_query_arg( |
|
78 | array( |
|
79 | 'action' => 'jetpack-sso', |
|
80 | 'redirect_to' => rawurlencode( admin_url() ), |
|
81 | ), |
|
82 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
83 | ); |
|
84 | } else { |
|
85 | $redirect_uri = admin_url(); |
|
86 | } |
|
87 | ||
88 | $request_body = array( |
|
89 | 'jp_version' => JETPACK__VERSION, |
@@ 258-266 (lines=9) @@ | ||
255 | $auto_enable_sso = ( ! ( new Connection_Manager() )->has_connected_owner() || Jetpack::is_module_active( 'sso' ) ); |
|
256 | ||
257 | /** This filter is documented in class.jetpack-cli.php */ |
|
258 | if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) { |
|
259 | $redirect_uri = add_query_arg( |
|
260 | array( |
|
261 | 'action' => 'jetpack-sso', |
|
262 | 'redirect_to' => rawurlencode( admin_url() ), |
|
263 | ), |
|
264 | wp_login_url() // TODO: come back to Jetpack dashboard? |
|
265 | ); |
|
266 | } |
|
267 | ||
268 | return $redirect_uri; |
|
269 | } |