The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

SimpleModal Login
Inconsistent Implementation of login_form Hook (3 posts)

  1. thenbrent
    Posted 5 years ago #

    Great work on a well written plugin!

    I've come across an issue with the do_action('login_form') hook.

    The wp-login.php file runs the do_action('login_form') hook as the login form is being printed. SimpleModal on the other hand builds the login form as a variable, runs the hook during this process, and then prints the entire form later.

    Many plugins that hook to do_action('login_form') print output, meaning if used with SimpleModal, output will be printed outside of the login form.

    I know I can get around it unhooking functions and using the simplemodal_login_form filter but it would be much better to have the login_form hook act consistently with that in wp-login.php.

  2. Eric Martin
    Plugin Author

    Posted 5 years ago #

    Thanks for your feedback.

    I certainly don't want to have the plugin act inconsistently with what is expected.

    Off the top of my head, I'm not sure what the best way would be to change the plugin to 1) act consistently and 2) work as needed. If you have any suggestions, I'd be happy to hear them.


  3. thenbrent
    Posted 5 years ago #

    Hi Eric,

    The least obtrusive method would be to wrap the do_action calls in an output buffer and append the output, like so:

    $output .= ob_get_clean();
    $output .= ob_get_clean();

    Hope that helps.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • SimpleModal Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic