Skip to content

Instantly share code, notes, and snippets.

@Coopeh
Created May 23, 2013 13:36
Show Gist options
  • Save Coopeh/5636132 to your computer and use it in GitHub Desktop.
Save Coopeh/5636132 to your computer and use it in GitHub Desktop.
Add the hidden fields to Wordpress' login, register, lost & retrieve password forms
function add_hidden_login_form_field() {
?>
<input type="hidden" name="fromWPForm" value="<?php echo constant('LOGINFORMKEY'); ?>" />
<?php
}
add_action( 'login_form','add_hidden_login_form_field' );
add_action( 'lostpassword_form','add_hidden_login_form_field' );
add_action( 'retrievepassword_form','add_hidden_login_form_field' );
add_action( 'register_form','add_hidden_login_form_field' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment