Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m pleased to hear you like the plugin!

    On your custom login form you could try adding a link to /wp-login.php?gaautologin=true

    For example:

    Login with Google

    As long as you have left the original wp-login.php functionality intact and simply added an extra custom login page, this should push the user straight into the Google login flow.

    I hope this helps.

    Thanks,

    Dan

    Would you guys consider adding
    add_action('login_form_top', array($this, 'ga_login_form'));
    on line 1148 of core_google_apps_login.php just below
    add_action('login_form', array($this, 'ga_login_form'));
    so it will apply to custom login forms automatically also?

    Thank you for the suggestion, but to be honest I think that would break things for the majority of users!

    I would suggest that your custom login form isn’t full following the standard set out by WordPress’ own login form structure. Ideally it would already call each of login_form_top and login_form of its own accord. So rather than fix the Google Apps Login plugin to make up for the custom login form being ‘wrong’, I think it would be best to insist the login form itself is changed.

    I hope this makes sense. It might be easiest to email me on [email protected] if you would like to discuss further!

    Regards,

    Dan

    Hey Dan,

    The login_form filter is actually only used for the stock wp-login.php file; if you want to include the filter on forms generated by the wp_login_form function, you’d need to use one of the filter hooks defined in that function here – https://core.trac.www.ads-software.com/browser/tags/4.2.2/src/wp-includes/general-template.php#L387

    I’m not quire sure what you mean my custom login form isn’t following the standard or is wrong, it’s just <?php echo wp_login_form(); ?> in the template where I want it.

    Sorry I only just saw your latest message – please do email if you’d like to discuss in more detail, and with a more timely response!

    I see what you mean about your custom login being pretty basic – just including the form.

    I’ll take a look in more detail when I get a chance, but I guess my worry is that there are a lot of other types of ‘custom login’ out there, and I’m wary of breaking some of them that currently happen to work with the plugin…

    Thanks,

    Dan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding Google login button to a custom login form’ is closed to new replies.