Hook to remove from all login form instances except wp-login.php
-
Hi there,
I would like to use the Authenticator only for users logging in directly via the wp-login.php page (I’m using Login With Ajax for front-end forms).
Below, I’ve taken a stab at a hook that I thought would work, but it isn’t:
add_action('init','deset_google_authenticator',0); function deset_google_authenticator(){ if ( $GLOBALS['pagenow'] === 'wp-login.php' ) { // Do Stuff } else { remove_action( 'login_form', array( 'GoogleAuthenticator', 'init' ) ); } }
Could you kindly let me know what I’m doing wrong / what I need to do in order to accomplish the above?
Thank in advance
- The topic ‘Hook to remove from all login form instances except wp-login.php’ is closed to new replies.