为什么不使用默认函数wp_login_form()
对于登录表单,例如:
global $user_login;
if (is_user_logged_in()) {
echo __( \'Hello\', \'theme_text_domain\' ) . $user_login . \'<a href="\' . wp_logout_url() . \'" title="\' . __( \'Logout\', \'theme_text_domain\' ) . \'">\' . __( \'Logout\', FB_BASIS_TEXTDOMAIN ) . \'</a>\';
} else {
wp_login_form();
}
函数及其参数,有关
the codexwp_login_form(array(
\'echo\' => true,
\'redirect\' => site_url($_SERVER[\'REQUEST_URI\']),
\'form_id\' => \'loginform\',
\'label_username\' => __(\'Username\'),
\'label_password\' => __(\'Password\'),
\'label_remember\' => __(\'Remember Me\'),
\'label_log_in\' => __(\'Log In\'),
\'id_username\' => \'user_login\',
\'id_password\' => \'user_pass\',
\'id_remember\' => \'rememberme\',
\'id_submit\' => \'wp-submit\',
\'remember\' => true,
\'value_username\' => ,
\'value_remember\' => false
))