• 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eric

    (@emartin24)

    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.

    -Eric

    Thread Starter thenbrent

    (@thenbrent)

    Hi Eric,

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

    ob_start();
    do_action('login_form');
    $output .= ob_get_clean();
    ob_start();
    do_action('register_form');
    $output .= ob_get_clean();

    Hope that helps.

    Brent

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: SimpleModal Login] Inconsistent Implementation of login_form Hook’ is closed to new replies.