你可以钩住login_form 行动:
/**
* Fires following the \'Password\' field in the login form.
*
* @since 2.1.0
*/
do_action( \'login_form\' );
在密码框和“记住我?”之间调用复选框,并在此处写出隐藏的输入字段,例如。
function wpse_366921_hidden_login_field() {
?>
<input type="hidden" name="hidden-login-field" value="1" />
<?php
}
add_action( \'login_form\', \'wpse_366921_hidden_login_field\', 10, 0 );