我无法理解$\\u请求[\'redirect\\u to\']是如何工作的。从何处获取“redirect\\u to”的值?
public function render_login_form( $attributes, $content = null ) {
// Parse shortcode attributes
$default_attributes = array( \'show_title\' => false );
$attributes = shortcode_atts( $default_attributes, $attributes );
$show_title = $attributes[\'show_title\'];
if ( is_user_logged_in() ) {
return __( \'You are already signed in.\', \'personalize-login\' );
}
// Pass the redirect parameter to the WordPress login functionality: by default,
// don\'t specify a redirect, but if a valid redirect URL has been passed as
// request parameter, use it.
$attributes[\'redirect\'] = \'\';
if ( isset( $_REQUEST[\'redirect_to\'] ) ) {
$attributes[\'redirect\'] = wp_validate_redirect( $_REQUEST[\'redirect_to\'], $attributes[\'redirect\'] );
}
// Render the login form using an external template
return $this->get_template_html( \'login_form\', $attributes );